[FFmpeg-devel] [PATCH v3 17/17] avformat/dvdvideodec: don't allow seeking beyond dvdnav reported duration
Marth64
marth64 at proxyid.net
Tue Oct 8 02:05:05 EEST 2024
There is no reason to accept timestamp values beyond what dvdnav
reported as the duration of the title.
Signed-off-by: Marth64 <marth64 at proxyid.net>
---
libavformat/dvdvideodec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/dvdvideodec.c b/libavformat/dvdvideodec.c
index 06f842cc1c..b3ad2d63aa 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) {
--
2.39.5 (Apple Git-154)
More information about the ffmpeg-devel
mailing list