Opened 7 years ago

Closed 7 years ago

#6627 closed defect (needs_more_info)

av_read_frame got incorrect packet after av_seek_frame

Reported by: leiming 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 leiming 7 years ago.
source code of program and sample video to cause the bug.
test.mp4 (45.2 KB ) - added by leiming 7 years ago.
sample video to cause the bug
ffmpegbug.cpp (2.8 KB ) - added by leiming 7 years ago.
program to reproduce the bug.

Download all attachments as: .zip

Change History (5)

by leiming, 7 years ago

Attachment: bug-sample.zip added

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

by leiming, 7 years ago

Attachment: test.mp4 added

sample video to cause the bug

by leiming, 7 years ago

Attachment: ffmpegbug.cpp added

program to reproduce the bug.

comment:1 by Carl Eugen Hoyos, 7 years ago

Keywords: mov added; mp4 demuxer removed

comment:2 by leiming, 7 years ago

Resolution: needs_more_info
Status: newclosed

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.