summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_h264.c
diff options
context:
space:
mode:
authorMatthew Szatmary <szatmary@gmail.com>2012-02-08 15:00:40 +0200
committerMartin Storsjö <martin@martin.st>2012-02-13 23:05:10 +0200
commit7dfe8f55575a3ae0fdd6f0678fa9627122580b07 (patch)
tree4688bc28c7f12d0f3c5e0c000f86c9b8802880a8 /libavformat/rtpdec_h264.c
parent529506b5f618bde1e6a2255b5320501d8e824fc7 (diff)
rtpdec: Use 4 byte startcodes for H.264
If muxing into mpegts, 4 byte startcodes for the first NAL of an access unit is required. Thus it is simplest for the RTP depacketizer to just use 4 byte startcodes everywhere. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_h264.c')
-rw-r--r--libavformat/rtpdec_h264.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index effdc1fe66..9da79fcbf5 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -113,7 +113,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;
@@ -176,7 +176,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 };
#ifdef DEBUG
assert(data);