aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-14 17:57:39 +0200
committerPaul B Mahol <onemda@gmail.com>2022-09-24 12:23:33 +0200
commit2f9fa7e3e9e85c736e6ba87192ec8f32bdf069a7 (patch)
tree00f8c162e9266ca978c629f86bd7b062d2217a87
parenta54da0831ca347e99f5e8f2050b4f102e3b177d8 (diff)
downloadffmpeg-2f9fa7e3e9e85c736e6ba87192ec8f32bdf069a7.tar.gz
avcodec/mjpegbdec: Don't create unnecessary AVFrame reference
MJPEG-B is an intra-codec, so it makes no sense to keep the reference. It is unused lateron anyway. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/mjpegbdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c
index dfc55d6cf8..98c64b44ca 100644
--- a/libavcodec/mjpegbdec.c
+++ b/libavcodec/mjpegbdec.c
@@ -142,8 +142,8 @@ read_header:
return buf_size;
}
- if ((ret = av_frame_ref(rframe, s->picture_ptr)) < 0)
- return ret;
+ av_frame_move_ref(rframe, s->picture_ptr);
+ s->got_picture = 0;
*got_frame = 1;
if (!s->lossless && avctx->debug & FF_DEBUG_QP) {