diff mpegtsenc.c @ 6487:3d0c78997acc libavformat

mpegtsenc: Write subtitle extradata if set
author thardin
date Mon, 27 Sep 2010 12:27:23 +0000
parents 50b1c5de4b71
children 96d44d29ac98
line wrap: on
line diff
--- a/mpegtsenc.c	Sun Sep 26 14:25:22 2010 +0000
+++ b/mpegtsenc.c	Mon Sep 27 12:27:23 2010 +0000
@@ -276,8 +276,13 @@
                 *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: