ff_add_index_entry: reject AV_NOPTS_VALUE
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Jul 2012 16:10:48 +0000 (18:10 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 26 Jul 2012 01:05:31 +0000 (03:05 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/utils.c

index 124476d..b753598 100644 (file)
@@ -1573,6 +1573,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;