diff mpegtsenc.c @ 3719:6772cfc78d33 libavformat

Change Dirac in MPEG-TS encapsulation to conform with spec changes. patch by Anuradha Suraparaju, anuradha rd.bbc.co uk
author diego
date Thu, 14 Aug 2008 11:17:23 +0000
parents 2ca19db359bd
children 7d2f3f1b68d8
line wrap: on
line diff
--- a/mpegtsenc.c	Thu Aug 14 03:24:58 2008 +0000
+++ b/mpegtsenc.c	Thu Aug 14 11:17:23 2008 +0000
@@ -668,6 +668,11 @@
         return 0;
     }
 
+    if (st->codec->codec_id == CODEC_ID_DIRAC) {
+        /* for Dirac, a single PES packet must be generated */
+        mpegts_write_pes(s, st, buf, size, pkt->pts, pkt->dts);
+        return 0;
+    }
     max_payload_size = DEFAULT_PES_PAYLOAD_SIZE;
     while (size > 0) {
         len = max_payload_size - ts_st->payload_index;