[FFmpeg-cvslog] ff_add_index_entry: reject AV_NOPTS_VALUE

Michael Niedermayer git at videolan.org
Thu Jul 26 03:10:02 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jul 24 18:10:48 2012 +0200| [12d1ee6a5e30a4427e2c7571230296b5e266952e] | committer: Michael Niedermayer

ff_add_index_entry: reject AV_NOPTS_VALUE

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12d1ee6a5e30a4427e2c7571230296b5e266952e
---

 libavformat/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 124476d..b753598 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;
 



More information about the ffmpeg-cvslog mailing list