aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/gif.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/gif.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/gif.c')
-rw-r--r--libavcodec/gif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index 131af6198a..11add64468 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -503,8 +503,7 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
}
if (!s->image) {
- av_frame_unref(s->last_frame);
- ret = av_frame_ref(s->last_frame, pict);
+ ret = av_frame_replace(s->last_frame, pict);
if (ret < 0)
return ret;
}