aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mwsc.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/mwsc.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/mwsc.c')
-rw-r--r--libavcodec/mwsc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/mwsc.c b/libavcodec/mwsc.c
index c7045ac793..f8c53c33ff 100644
--- a/libavcodec/mwsc.c
+++ b/libavcodec/mwsc.c
@@ -127,8 +127,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
frame->pict_type = (frame->flags & AV_FRAME_FLAG_KEY) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
- av_frame_unref(s->prev_frame);
- if ((ret = av_frame_ref(s->prev_frame, frame)) < 0)
+ if ((ret = av_frame_replace(s->prev_frame, frame)) < 0)
return ret;
*got_frame = 1;