[libav-bugs] [Bug 425] New: avformat_find_stream_info() messes up packet/frame decoding

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Fri Jan 11 18:51:54 CET 2013


https://bugzilla.libav.org/show_bug.cgi?id=425

           Summary: avformat_find_stream_info() messes up packet/frame
                    decoding
           Product: Libav
           Version: 0.8
          Platform: X86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: libavformat
        AssignedTo: bugzilla at libav.org
        ReportedBy: max_schmerz at gmx.net


Created attachment 373
  --> https://bugzilla.libav.org/attachment.cgi?id=373
minimal project & example video to reproduce the error

after using the function avformat_find_stream_info() it is not possible to
decode all frames of a video file.

to reproduce this error i made a small project that reads all packets of a
video with 10 frames, decodes all packets to AVFrames and print the
corresponding timestamps (pts).

Output:
  packet.pts=0 => frame.pts=0
  packet.pts=1 => frame.pts=1
  packet.pts=2 => frame.pts=2
  packet.pts=3 => frame.pts=3
  packet.pts=4 => frame.pts=4
  packet.pts=5 => frame.pts=5
  packet.pts=6 => frame.pts=6
  packet.pts=7 => frame.pts=7
  packet.pts=8 => frame.pts=8
  packet.pts=9 => frame.pts=9

now i just added the avformat_find_stream_info() function in advance and run
the same code again.

Output:
  packet.pts=0 => GOT NO PICTURE
  packet.pts=1 => GOT NO PICTURE
  packet.pts=2 => GOT NO PICTURE
  packet.pts=3 => GOT NO PICTURE
  packet.pts=4 => frame.pts=0
  packet.pts=5 => frame.pts=1
  packet.pts=6 => frame.pts=2
  packet.pts=7 => frame.pts=3
  packet.pts=8 => frame.pts=4
  packet.pts=9 => frame.pts=5

as you can see, the first packets are not decoded correctly and the following
frames got a "shifted" pts

-- 
Configure bugmail: https://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