[FFmpeg-devel] [PATCH] mpegts: Write subtitle extradata if set

Tomas Härdin tomas.hardin
Fri Sep 24 13:12:16 CEST 2010


Hi

When remuxing mpegts with dvbsub streams no subtitles are output when
ffplay or vlc decodes the resulting file. I've tracked this down to two
causes:

1. The mpegts muxer doesn't write the subtitle stream's extradata
(compare mpegts.c:987 and mpegtsenc.c:279). Instead it makes up its own
data, which then causes the dvbsub decoder to do nothing since page_id
matches neither composition_id nor ancillary_id

2. dvbsub_parser strips a few bytes off the subtitle data. These bytes
need to be put back in before the packets are muxed, presumably using a
bitstream filter

I thought I'd post the first fix on that list while I work on the second
part. The fix is simple: if the muxer has exactly 4 B extradata for the
subtitle stream then write it.

Patch attached, passed regtests. Also attached indentation patch. I
could upload a sample if you wish. I didn't yet because the patch is
quite trivial.

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpegts_sub_extradata.patch
Type: text/x-patch
Size: 769 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100924/4e8a759c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpegts_sub_extradata_indent.patch
Type: text/x-patch
Size: 635 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100924/4e8a759c/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100924/4e8a759c/attachment.pgp>



More information about the ffmpeg-devel mailing list