[Libav-user] Repeating frames

Tim Pitman tapitman11 at gmail.com
Thu Oct 25 01:58:36 CEST 2012


I'm using avcodec_decode_video2() to decode h264 frames encoded by
x264 one frame at a time. The stream is being transmitted over a lossy
physical layer wireless channel prior to decoding. I'm trying to
implement logic to re-display the last good picture if the current
picture fails to decode for whatever reason. The logic I tried was to
simply memcpy(lastGoodFrame, currFrame, sizeof(AVFrame)) each time
got_picture_ptr is true and if got_picture_ptr is false then I display
lastGoodFrame instead of currFrame. However, I'm getting unexpected
behavior and blocking patterns. I suspect that this is due to libav
doing interframe prediction decoding. Is this the case? Is there a way
to do what I'm trying to accomplish?


More information about the Libav-user mailing list