From: Matthew Szatmary <[email protected]>

The mpegts muxer assumes/requires 4 byte startcodes for annex b data.
---
 libavformat/rtpdec_h264.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 1782173..c79cb53 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -114,7 +114,7 @@ static int sdp_parse_fmtp_config_h264(AVStream * stream,
             h264_data->level_idc = level_idc;
         }
     } else  if (!strcmp(attr, "sprop-parameter-sets")) {
-        uint8_t start_sequence[]= { 0, 0, 1 };
+        uint8_t start_sequence[] = { 0, 0, 0, 1 };
         codec->extradata_size= 0;
         codec->extradata= NULL;
 
@@ -177,7 +177,7 @@ static int h264_handle_packet(AVFormatContext *ctx,
     uint8_t nal = buf[0];
     uint8_t type = (nal & 0x1f);
     int result= 0;
-    uint8_t start_sequence[]= {0, 0, 1};
+    uint8_t start_sequence[] = { 0, 0, 0, 1 };
     uint8_t orig_type = type;
 
 #ifdef DEBUG
-- 
1.7.3.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to