diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-07 12:02:26 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-10 21:22:30 +0200 |
commit | cfa47fd3310aa64d5c48e855bfcaf26d170bcbc1 (patch) | |
tree | 81b7df5f60d0808297dafc4229dac9def914749e /libavcodec/pdvdec.c | |
parent | 0487786ffe272af2954ed4d81e827f7ad9e76895 (diff) | |
download | ffmpeg-cfa47fd3310aa64d5c48e855bfcaf26d170bcbc1.tar.gz |
all: Use av_frame_replace() where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/pdvdec.c')
-rw-r--r-- | libavcodec/pdvdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/pdvdec.c b/libavcodec/pdvdec.c index d50c4e729c..e2c03e7e0d 100644 --- a/libavcodec/pdvdec.c +++ b/libavcodec/pdvdec.c @@ -102,8 +102,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, dst += frame->linesize[0]; } - av_frame_unref(s->previous_frame); - if ((ret = av_frame_ref(s->previous_frame, frame)) < 0) + if ((ret = av_frame_replace(s->previous_frame, frame)) < 0) return ret; if (avpkt->flags & AV_PKT_FLAG_KEY) { |