Commit 3c148703 authored by Martin Storsjö's avatar Martin Storsjö

rtpdec_h264: Reorder code blocks

This removes one level of indentation.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent b3688617
......@@ -137,7 +137,11 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
uint8_t *dest = av_malloc(packet_size + sizeof(start_sequence) +
codec->extradata_size +
FF_INPUT_BUFFER_PADDING_SIZE);
if (dest) {
if (!dest) {
av_log(codec, AV_LOG_ERROR,
"Unable to allocate memory for extradata!");
return AVERROR(ENOMEM);
}
if (codec->extradata_size) {
memcpy(dest, codec->extradata, codec->extradata_size);
av_free(codec->extradata);
......@@ -152,11 +156,6 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
codec->extradata = dest;
codec->extradata_size += sizeof(start_sequence) + packet_size;
} else {
av_log(codec, AV_LOG_ERROR,
"Unable to allocate memory for extradata!");
return AVERROR(ENOMEM);
}
}
}
av_log(codec, AV_LOG_DEBUG, "Extradata set to %p (size: %d)!",
......
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