mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avformat/dvdvideodec: don't allow seeking beyond dvdnav reported duration
There is no reason to accept timestamp values beyond what dvdnav reported as the duration of the title. Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
parent
0912407b9d
commit
1d55f54846
@ -1743,7 +1743,7 @@ static int dvdvideo_read_seek(AVFormatContext *s, int stream_index, int64_t time
|
||||
if ((flags & AVSEEK_FLAG_BYTE))
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
if (timestamp < 0)
|
||||
if (timestamp < 0 || timestamp > s->duration)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
if (!c->seek_warned) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user