summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsub.c
diff options
context:
space:
mode:
authorSerhii Marchuk <serhii.marchuk@gmail.com>2014-01-11 22:54:29 +0200
committerClément Bœsch <u@pkh.me>2014-01-12 16:40:52 +0100
commitc917cde9cc52ad1ca89926a617f847bc9861d5a0 (patch)
treedff0a5303aed94b52465c42fab9d645a78ab625e /libavcodec/dvbsub.c
parentd497141b859488225a5869cee66ca91675cd07d9 (diff)
mpegts muxer, DVB subtitles encoder: common DVB subtitles payload
Improved DVB subtitles encoder to generate AVPacket.data in the same format as generates MPEGTS demuxer + DVB subtitles parser. So now single format of DVB subtitles data is used across all the components of FFmpeg: only subtitles payload WITHOUT 0x20 0x00 bytes at the beginning and 0xFF trailing byte. Improved MPEGTS muxer to support format of DVB subtitles in AVPacket.data described above: while muxing we add two bytes 0x20 0x00 to the beginning of and 0xFF to the end of DVB subtitles payload. The patch fixes DVB subtitle copy problems: tickets #2989 fully and #2024 partly. Signed-off-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/dvbsub.c')
-rw-r--r--libavcodec/dvbsub.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index f30b7674f7..f6b46e64a9 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -261,8 +261,6 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
if (h->num_rects && h->rects == NULL)
return -1;
- *q++ = 0x00; /* subtitle_stream_id */
-
/* page composition segment */
*q++ = 0x0f; /* sync_byte */
@@ -437,8 +435,6 @@ static int encode_dvb_subtitles(DVBSubtitleContext *s,
bytestream_put_be16(&pseg_len, q - pseg_len - 2);
- *q++ = 0xff; /* end of PES data */
-
s->object_version = (s->object_version + 1) & 0xf;
return q - outbuf;
}