h4tr3d / avcpp

C++ wrapper for FFmpeg
Other
448 stars 81 forks source link

Decoded frames have invalid PTS #114

Closed mmomtchev closed 10 months ago

mmomtchev commented 10 months ago

If one follows the example example/api2-samples/api2-decode-encode-video.cpp, a VideoDecoderContext won't have a valid timebase, yet when decoding, each individual frames will be converted to the timebase of the videodecoder (default-constructed 0/1):

https://github.com/h4tr3d/avcpp/blob/4aaaaa11d18f5f4d2e364796dffada105943ba48/src/codeccontext.cpp#L928

As a result, frames have invalid PTS. This is one of the problems of #113 - that is solved by the user code manually counting the frames.