aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarth64 <marth64@proxyid.net>2024-10-07 18:05:05 -0500
committerMarth64 <marth64@proxyid.net>2024-11-16 14:40:51 -0600
commit1d55f548466516a6a4ed4cc67e118e1c29c6ae5a (patch)
tree291afb2692330fe75cdd2b89a00573c778a3a9bd
parent0912407b9de431fb750e74cb307ea7a11fc27e6b (diff)
downloadffmpeg-1d55f548466516a6a4ed4cc67e118e1c29c6ae5a.tar.gz
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>
-rw-r--r--libavformat/dvdvideodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index 179181ce69..4d11480dfd 100644
--- a/libavformat/dvdvideodec.c
+++ b/libavformat/dvdvideodec.c
@@ -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) {