aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mss2.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-07 12:02:26 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-10 21:22:30 +0200
commitcfa47fd3310aa64d5c48e855bfcaf26d170bcbc1 (patch)
tree81b7df5f60d0808297dafc4229dac9def914749e /libavcodec/mss2.c
parent0487786ffe272af2954ed4d81e827f7ad9e76895 (diff)
downloadffmpeg-cfa47fd3310aa64d5c48e855bfcaf26d170bcbc1.tar.gz
all: Use av_frame_replace() where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mss2.c')
-rw-r--r--libavcodec/mss2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index 98103f7fed..94211ffc5e 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -797,8 +797,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, AVFrame *frame,
av_log(avctx, AV_LOG_WARNING, "buffer not fully consumed\n");
if (c->mvX < 0 || c->mvY < 0) {
- av_frame_unref(ctx->last_pic);
- ret = av_frame_ref(ctx->last_pic, frame);
+ ret = av_frame_replace(ctx->last_pic, frame);
if (ret < 0)
return ret;
}