Showing the changes to libavcodec/cdgraphics.c (1 of 31 files). Show all
Unified · Split
| @@ -344,8 +344,7 @@ static int cdg_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 343 unmodified lines | ||
| 344 | 344 | return ret; |
| 345 | 345 | |
| 346 | 346 | cdg_scroll(cc, cdg_data, frame, inst == CDG_INST_SCROLL_COPY); |
| 347 | − av_frame_unref(cc->frame); | |
| 348 | − ret = av_frame_ref(cc->frame, frame); | |
| 347 | + ret = av_frame_replace(cc->frame, frame); | |
| 349 | 348 | if (ret < 0) |
| 350 | 349 | return ret; |
| 351 | 350 | break; |