1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavf: avformat_seek_file(): validate stream_index.

This commit is contained in:
Nicolas George 2013-03-20 12:27:42 +01:00
parent de1568a452
commit 0d09aa9d8e

View File

@ -2137,6 +2137,8 @@ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int
{
if(min_ts > ts || max_ts < ts)
return -1;
if (stream_index < -1 || stream_index >= (int)s->nb_streams)
return AVERROR(EINVAL);
if(s->seek2any>0)
flags |= AVSEEK_FLAG_ANY;