Commit cd03a180 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

avcodec/mjpegdec: Use AVCodecInternal.in_pkt for buffer packet

Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent 7c5ee237
...@@ -127,9 +127,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) ...@@ -127,9 +127,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
s->picture_ptr = s->picture; s->picture_ptr = s->picture;
} }
s->pkt = av_packet_alloc(); s->pkt = avctx->internal->in_pkt;
if (!s->pkt)
return AVERROR(ENOMEM);
s->avctx = avctx; s->avctx = avctx;
ff_blockdsp_init(&s->bdsp, avctx); ff_blockdsp_init(&s->bdsp, avctx);
...@@ -2960,8 +2958,6 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx) ...@@ -2960,8 +2958,6 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
} else if (s->picture_ptr) } else if (s->picture_ptr)
av_frame_unref(s->picture_ptr); av_frame_unref(s->picture_ptr);
av_packet_free(&s->pkt);
av_frame_free(&s->smv_frame); av_frame_free(&s->smv_frame);
av_freep(&s->buffer); av_freep(&s->buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment