diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-24 18:10:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-26 03:05:31 +0200 |
commit | 12d1ee6a5e30a4427e2c7571230296b5e266952e (patch) | |
tree | 2a2a5faacdada2575d171ea4761b858797d91a1f | |
parent | 2cd491a47cdf217c89ba5445bbe6e9b10ecd1ca0 (diff) | |
download | ffmpeg-12d1ee6a5e30a4427e2c7571230296b5e266952e.tar.gz |
ff_add_index_entry: reject AV_NOPTS_VALUE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 124476ded6..b753598950 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; |