You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/m[jx]pegdec: Simplify freeing frame
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -2954,11 +2954,8 @@ av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
|
|||||||
av_log(avctx, AV_LOG_INFO, "Single field\n");
|
av_log(avctx, AV_LOG_INFO, "Single field\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->picture) {
|
av_frame_free(&s->picture);
|
||||||
av_frame_free(&s->picture);
|
s->picture_ptr = NULL;
|
||||||
s->picture_ptr = NULL;
|
|
||||||
} else if (s->picture_ptr)
|
|
||||||
av_frame_unref(s->picture_ptr);
|
|
||||||
|
|
||||||
av_frame_free(&s->smv_frame);
|
av_frame_free(&s->smv_frame);
|
||||||
|
|
||||||
|
@@ -47,10 +47,8 @@ typedef struct MXpegDecodeContext {
|
|||||||
static av_cold int mxpeg_decode_end(AVCodecContext *avctx)
|
static av_cold int mxpeg_decode_end(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
MXpegDecodeContext *s = avctx->priv_data;
|
MXpegDecodeContext *s = avctx->priv_data;
|
||||||
MJpegDecodeContext *jpg = &s->jpg;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
jpg->picture_ptr = NULL;
|
|
||||||
ff_mjpeg_decode_end(avctx);
|
ff_mjpeg_decode_end(avctx);
|
||||||
|
|
||||||
for (i = 0; i < 2; ++i)
|
for (i = 0; i < 2; ++i)
|
||||||
|
Reference in New Issue
Block a user