[FFmpeg-cvslog] avformat/vobsub: compare correct packet stream IDs
wm4
git at videolan.org
Mon Sep 21 13:14:03 CEST 2015
ffmpeg | branch: master | wm4 <nfxjfg at googlemail.com> | Mon Sep 21 12:09:08 2015 +0200| [a47ad06baf6c0db6d47a5531d6d4ee0511f44eac] | committer: Michael Niedermayer
avformat/vobsub: compare correct packet stream IDs
The stream ID is essentially an arbitrary number defined by the .idx
file headers. They have to match the IDs in the .sub stream. The vobsub
demuxer assumed the IDs would just start from 0, increassing by 1 for
each stream. This is not correct. In the sample I had, the IDs were
starting from 1, leading to no subtitles being displayed at all.
Fix this by using the correct stream ID.
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a47ad06baf6c0db6d47a5531d6d4ee0511f44eac
---
libavformat/mpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 223b690..a63b567 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -939,7 +939,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt)
total_read += pkt_size;
/* the current chunk doesn't match the stream index (unlikely) */
- if ((startcode & 0x1f) != idx_pkt.stream_index)
+ if ((startcode & 0x1f) != s->streams[idx_pkt.stream_index]->id)
break;
ret = av_grow_packet(pkt, to_read);
More information about the ffmpeg-cvslog
mailing list