[FFmpeg-devel] Latest FFMPEG 0.9 Issues

Michael Niedermayer michaelni at gmx.at
Fri Dec 30 22:21:02 CET 2011


On Thu, Dec 29, 2011 at 12:04:23PM -0800, C Chatterjee wrote:
> 
> I have been working with the latest ffmpeg 0.9 release and discovered the following issues which did not exist in the last ffmpeg I have been using from Jan 2011.
> 
> 1. AAC audio decode.
> I have a number of (H264+AAC) sequences which decoded fine but now I get an error in the first packet and works fine from there on. I found the issue in parse_adts_frame_header() function in aacdec.c. The sequence is initialized with ac->m4ac.chan_config = 2. But this function sets it to 0. Hence it fails in aac_decode_frame_int() and produces the following error:
>             if (!(che=get_che(ac, elem_type, elem_id))) {
>                 av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n",
>                        elem_type, elem_id);
>                 return -1;
>             }
> The old ffmpeg initialized ac->m4ac.chan_config to 0 and set it to 2 in the parse_adts_frame_header().
> Commenting out ac->m4ac.chan_config = 0; in parse_adts_frame_header() works great.

can you upload a sample or provide a url of an existing sample with
which this is reproduceable ?


> 
> 2. AAC Encode to flv and mp4/mov
> If the first aac packet has the 2 byte header and payload together, the old ffmpeg encoded it correctly. The new ffmpeg checks for the pkt size to be 2 and errors.
> flvenc.c - flv_write_packet() and 
> movenc.c - ff_mov_write_packet()
> have the following lines of code:
> 
>     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;
> 
> Commenting this out the pkt->size > 2  works great. Otherwise we need to use -absf aac_adtstoasc.

I suspect the files generated without the check are invalid and will
not play on all players. But i may be wrong


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111230/1be45004/attachment.asc>


More information about the ffmpeg-devel mailing list