summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-11 10:40:24 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-11-07 17:46:55 +0100
commitcd03a180cb66ca199707ad129a4ab44548711c94 (patch)
treed77c340673b1659b25594d554cb6b0ff20d05ef9 /libavcodec/mjpegdec.c
parent7c5ee237bebbaaac6a2734d1919c005ca9684055 (diff)
avcodec/mjpegdec: Use AVCodecInternal.in_pkt for buffer packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 7f89641660..8b154ce0ab 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -127,9 +127,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
s->picture_ptr = s->picture;
}
- s->pkt = av_packet_alloc();
- if (!s->pkt)
- return AVERROR(ENOMEM);
+ s->pkt = avctx->internal->in_pkt;
s->avctx = avctx;
ff_blockdsp_init(&s->bdsp, avctx);
@@ -2960,8 +2958,6 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
} else if (s->picture_ptr)
av_frame_unref(s->picture_ptr);
- av_packet_free(&s->pkt);
-
av_frame_free(&s->smv_frame);
av_freep(&s->buffer);