Commit b0a0e83a authored by Michael Niedermayer's avatar Michael Niedermayer

Revert "flvenc: Remove apparently unneeded AAC check."

According to video_file_format_spec_v10_1.pdf flv stores AAC RAW
thanks to Baptiste Coudurier for pointing that out

thanks to Aℓex Converse for explaining:
	This can't be at the start of a non-ADTS payload. 111 is the
	EndOfFrame syntax element.

Together these proof that the check was correctly rejecting ADTS which
is not supposed to be in flv. Many players are able to play such ADTS
in flv though but its better if we conform to the spec as this should
ensure that not many but all players can play files generated by ffmpeg.

This reverts commit 3c9a86df.
parent 4fe54487
......@@ -445,6 +445,10 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
if (ff_avc_parse_nal_units_buf(pkt->data, &data, &size) < 0)
return -1;
}
} else if (enc->codec_id == CODEC_ID_AAC && pkt->size > 2 &&
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
return -1;
}
if (flv->delay == AV_NOPTS_VALUE)
flv->delay = -pkt->dts;
......
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