[FFmpeg-cvslog] avformat/dvdvideodec: don't allow seeking beyond dvdnav reported duration

Marth64 git at videolan.org
Sat Nov 16 22:49:01 EET 2024


ffmpeg | branch: master | Marth64 <marth64 at proxyid.net> | Mon Oct  7 18:05:05 2024 -0500| [1d55f548466516a6a4ed4cc67e118e1c29c6ae5a] | committer: Marth64

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 at proxyid.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1d55f548466516a6a4ed4cc67e118e1c29c6ae5a
---

 libavformat/dvdvideodec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {



More information about the ffmpeg-cvslog mailing list