[FFmpeg-trac] #6584(avformat:new): MP4 with edit list and multiple stsds not decoding correctly

FFmpeg trac at avcodec.org
Sat Aug 12 11:38:42 EEST 2017

#6584: MP4 with edit list and multiple stsds not decoding correctly
             Reporter:  zhangjiejun  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avformat     |                  Version:
             Keywords:               |  unspecified
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
 When a MP4 has both edit list and multiple stsds, it does not decode
 correctly with ffmpeg. An example is
 https://www.dropbox.com/s/qz0ort4znqq9jdy/attachment_video.mov?dl=0. Such
 videos can be easily generated by iOS, when using AVMutableComposition and
 AVAssetExportSession to replace a part of a video with another totally
 different video.

 To reproduce, run:
 {{{ffmpeg -i attachment_video.mov frames/frame%03d.jpg}}}

 Take a look at frame327.jpg, frame328.jpg, frame329.jpg frame330.jpg. They
 are pure-green, which is wrong. They should be exactly the same as

 FFmpeg also prints error messages:
 [h264 @ 0x7fbfc9040a00] reference count overflow
 [h264 @ 0x7fbfc9040a00] decode_slice_header error
 [h264 @ 0x7fbfc9040a00] no frame!
 Past duration 0.999992 too large
     Last message repeated 7 times
 Error while decoding stream #0:0: Invalid data found when processing input
 Past duration 0.999992 too large
 [h264 @ 0x7fbfc9004800] reference count overflow
 [h264 @ 0x7fbfc9004800] decode_slice_header error
 [h264 @ 0x7fbfc9004800] no frame!
 [h264 @ 0x7fbfc9001000] reference count overflow
 [h264 @ 0x7fbfc9001000] decode_slice_header error
 [h264 @ 0x7fbfc9001000] no frame!

 The root cause is that FFmpeg used a wrong stsd to decode several frames.

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

More information about the FFmpeg-trac mailing list