Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-09-21 13:09:08 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-08 16:21:45 +0300
commiteca7b0dccecea4c2a6adf75f5ea9a595a971eadc (patch)
tree2f32d0ed7d6ca464179756d6e9dda4f7db15c0e8 /libavformat
parent64b659673a1ccc74b219b364f58bcd7b8dddb256 (diff)
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@niedermayer.cc> (cherry picked from commit a47ad06baf6c0db6d47a5531d6d4ee0511f44eac) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 787d5f0033..96918d6f7e 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);