[FFmpeg-trac] #6818(undetermined:new): FFmpeg fails to decode first frame in file due to multiple frames in a packet.

FFmpeg trac at avcodec.org
Wed Nov 8 02:35:41 EET 2017


#6818: FFmpeg fails to decode first frame in file due to multiple frames in a
packet.
-------------------------------------+-------------------------------------
               Reporter:             |                  Owner:
  dalecurtis                         |                 Status:  new
                   Type:  defect     |              Component:
               Priority:  normal     |  undetermined
                Version:             |               Keywords:
  unspecified                        |               Blocking:
             Blocked By:             |  Analyzed by developer:  0
Reproduced by developer:  0          |
-------------------------------------+-------------------------------------
 Using ToT with the attached file:

 $ ffmpeg -i bear-1280x720-a_frag-cenc_clear-all.mp4 -f framecrc out.txt

 [aac @ 0xf57080] Multiple frames in a packet.
 [aac @ 0xf57080] channel element 0.0 is not allocated
 Error while decoding stream #0:0: Invalid data found when processing input

 Which comes from these lines:

 http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/decode.c;hb=HEAD#l528
 http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/aacdec_template.c;hb=HEAD#l3048

 The new avcodec_send_packet(), avcodec_receive_frame() APIs offer no way
 to handle multi-frame packets, yet ffmpeg is still demuxing / creating
 such packets. So we end up with decoder errors when the remainder of the
 packet isn't handled.

 It seems either ffmpeg should not produce such packets or it should
 properly handle multi-frame packets; either by extending
 avcodec_receive_frame() to loop over the remainder of the packet or to
 have aac_decode_frame() properly do this internally.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6818>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list