[FFmpeg-devel] [PATCH] matroska decoder outputs subtitles data into video/audio stream

Joakim Plate joakim.plate
Sun Jun 24 19:25:12 CEST 2007


Currently when matroska demuxer comes upon a track with subtitle data, it
skips adding this to the stream collection in avformat. When it later get's
a data packet for the subtitle stream, it assume that stream_index in the
Track structure points to a valid avstream. Since the track structures is
av_mallocz'ed, it will always point to stream index 0 for any track that
wasn't added to the avstream collection.

This patch allows the subtitle tracks to be added to the collection. This
fixes the issue for subtitles, with the side effect that the data is
available to any user of avformat (not that it's in any know format, but

There probably still should be added some check in matroska_parse_block that
the track the block belongs too, actually has a valid avstream. Maybe
initing stream_index to (uint32)(-1) and checking for that would be good

-------------- next part --------------
A non-text attachment was scrubbed...
Name: matroskadec.patch
Type: application/octet-stream
Size: 695 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070624/bac23532/attachment.obj>

More information about the ffmpeg-devel mailing list