ff_add_index_entry: reject AV_NOPTS_VALUE

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-07-24 18:10:48 +02:00
parent 2cd491a47c
commit 12d1ee6a5e
1 changed files with 3 additions and 0 deletions

View 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;