Commit 7dfe8f55 authored by Matthew Szatmary's avatar Matthew Szatmary Committed by Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent 529506b5
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment