summaryrefslogtreecommitdiff
path: root/libavformat/mpegtsenc.c
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2010-09-27 12:27:23 +0000
committerTomas Härdin <tomas.hardin@codemill.se>2010-09-27 12:27:23 +0000
commitd1ac03517e66ff12564c4d5abcb204e9a4e424b6 (patch)
tree2aa53c08165738bd019eb37631235b78706c391d /libavformat/mpegtsenc.c
parentbe0e596a57633a1358a4414239947f42b328af74 (diff)
mpegtsenc: Write subtitle extradata if set
Originally committed as revision 25221 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r--libavformat/mpegtsenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index ac09ab93d5..94a051d96f 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -276,8 +276,13 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
*q++ = language[1];
*q++ = language[2];
*q++ = 0x10; /* normal subtitles (0x20 = if hearing pb) */
+ if(st->codec->extradata_size == 4) {
+ memcpy(q, st->codec->extradata, 4);
+ q += 4;
+ } else {
put16(&q, 1); /* page id */
put16(&q, 1); /* ancillary page id */
+ }
}
break;
case AVMEDIA_TYPE_VIDEO: