[Ffmpeg-devel] difference between av_read_packet() decoding and av_read_frame()
egf05 at doc.ic.ac.uk
Tue Jun 20 20:13:04 CEST 2006
I see a different behaviour when decoding frames with the old and deprecated
av_read_packet() function and av_read_frame().
I need to decode mpeg frames from a video file. Using av_read_packet() to
reconstruct a frame, I can get the video frames correctly. I can retrieve in
AVFrame->data, data and data the three Y U and V buffers respectively,
and can save them as a jpeg image.
However, when I use the new av_read_frame() function, the AVFrame frames I get
are sometimes garbled, with squares. Actually, it seems they look like P frames,
with blocks that correspond to changes compared to the last keyframe. Is it
normal? How to use av_read_frame() so that I could get "normal" decoded frames,
one by one ?
More information about the ffmpeg-devel