[FFmpeg-devel] [PATCH 7/7] ff_add_index_entry: reject AV_NOPTS_VALUE

Michael Niedermayer michaelni at gmx.at
Tue Jul 24 18:15:39 CEST 2012


Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavformat/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index b43885e..6c7ca05 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1569,6 +1569,9 @@ int ff_add_index_entry(AVIndexEntry **index_entries,
     if((unsigned)*nb_index_entries + 1 >= UINT_MAX / sizeof(AVIndexEntry))
         return -1;
 
+    if(timestamp == AV_NOPTS_VALUE)
+        return AVERROR(EINVAL);
+
     if (is_relative(timestamp)) //FIXME this maintains previous behavior but we should shift by the correct offset once known
         timestamp -= RELATIVE_TS_BASE;
 
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list