[FFmpeg-cvslog] avformat/vobsub: fix invalid sub queue access while seeking.

Clément Bœsch git at videolan.org
Sun Oct 20 21:29:28 CEST 2013


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Sun Oct 20 21:23:43 2013 +0200| [4189fe11ffcbdcd311eb9a3437586a94492c4cde] | committer: Clément Bœsch

avformat/vobsub: fix invalid sub queue access while seeking.

If there is only 1 stream and seek isn't called with a specific stream
index, we pick the first (and only) one.

Regression since dbfe6110.

Fixes CID1108591.

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

 libavformat/mpeg.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 64c5a4f..1ea58d5 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -916,6 +916,8 @@ static int vobsub_read_seek(AVFormatContext *s, int stream_index,
         return ret;
     }
 
+    if (stream_index == -1) // only 1 stream
+        stream_index = 0;
     return ff_subtitles_queue_seek(&vobsub->q[stream_index], s, stream_index,
                                    min_ts, ts, max_ts, flags);
 }



More information about the ffmpeg-cvslog mailing list