Browse Source

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 3c9a86df0e.
tags/n0.11
Michael Niedermayer 13 years ago
parent
commit
b0a0e83aee
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/flvenc.c

+ 4
- 0
libavformat/flvenc.c View File

@@ -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;


Loading…
Cancel
Save