Opened 4 months ago

Closed 3 months ago

#6627 closed defect (needs_more_info)

av_read_frame got incorrect packet after av_seek_frame

Reported by: sorayuki Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm writing a C program to use avformat to demux the attached mp4 file and feed audio track to decoder. I found avformat read packet in incorrect size after seek to begining, and decoder refused to decode that packet.

How to reproduce:
windows 10 x64, visual studio 2013, linked with nightly build 20170827-ef0c6d9-win32 (32bit) from https://ffmpeg.zeranoe.com/builds/

I use av_read_frame to read packet from video file, and feed the packet of audio track through avcodec_send_packet to decoder, then receive frame by avcodec_receive_frame. After decoding finished, I use av_seek_frame to rewind and read the file again.

The program's output should explain the issue.

attachments are the program and sample video file.

Attachments (3)

bug-sample.zip (5.8 KB) - added by sorayuki 4 months ago.
source code of program and sample video to cause the bug.
test.mp4 (45.2 KB) - added by sorayuki 4 months ago.
sample video to cause the bug
ffmpegbug.cpp (2.8 KB) - added by sorayuki 4 months ago.
program to reproduce the bug.

Download all attachments as: .zip

Change History (5)

Changed 4 months ago by sorayuki

source code of program and sample video to cause the bug.

Changed 4 months ago by sorayuki

sample video to cause the bug

Changed 4 months ago by sorayuki

program to reproduce the bug.

comment:1 Changed 4 months ago by cehoyos

  • Keywords mov added; mp4 demuxer removed

comment:2 Changed 3 months ago by sorayuki

  • Resolution set to needs_more_info
  • Status changed from new to closed

In second turn, that the audio packet with the same pts is larger
is caused by the merging of side data.

Decoding error may be caused by other problem.

Note: See TracTickets for help on using tickets.