[libav-bugs] [Bug 600] New: AVFrame.pkt_dts incorrect for some files

bugzilla at libav.org bugzilla at libav.org
Thu Nov 28 11:56:19 CET 2013


http://bugzilla.libav.org/show_bug.cgi?id=600

           Summary: AVFrame.pkt_dts incorrect for some files
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: general
        AssignedTo: bugzilla at libav.org
        ReportedBy: nfxjfg at googlemail.com


The first AVFrame output by the decoder has AVFrame.pkt_dts set to the (Nth+1)
packet's dts, where N is the codec delay (apparently). However, some file
formats have the first frame's timestamp in the first packet's DTS. This means
the decoder will output the timestamp of the (Nth+1) frame's DTS.

This affects AVI, vfw-muxed MKV, and mpeg4 in OGM.

On IRC, it was said that libavcodec is working as intended, however the end
result (e.g. in avplay/avconv with guess_correct_pts(), or whatever user code
is supposed to do) is still wrong with the file formats mentioned above. It
also seems to be pretty hard to fix in libavformat (at least the demuxers had
to guess the codec delay?)

As a consequence, the effective start time of the video will be incorrect, and
I don't even know what happens to the timestamp of the last frame. Seeking is
broken too, since seeking to a key frame position will make user code think
it's off by one frame.

Here's a test file (a vfw-muxed mpeg4 mkv file): 
​http://www.cccp-project.net/beta/test_files/[CCCP]_Mega_Lossless_Audio_Test.mkv

-- 
Configure bugmail: http://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list