You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +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");
|
||||
}
|
||||
|
||||
if (s->picture) {
|
||||
av_frame_free(&s->picture);
|
||||
s->picture_ptr = NULL;
|
||||
} else if (s->picture_ptr)
|
||||
av_frame_unref(s->picture_ptr);
|
||||
av_frame_free(&s->picture);
|
||||
s->picture_ptr = NULL;
|
||||
|
||||
av_frame_free(&s->smv_frame);
|
||||
|
||||
|
@ -47,10 +47,8 @@ typedef struct MXpegDecodeContext {
|
||||
static av_cold int mxpeg_decode_end(AVCodecContext *avctx)
|
||||
{
|
||||
MXpegDecodeContext *s = avctx->priv_data;
|
||||
MJpegDecodeContext *jpg = &s->jpg;
|
||||
int i;
|
||||
|
||||
jpg->picture_ptr = NULL;
|
||||
ff_mjpeg_decode_end(avctx);
|
||||
|
||||
for (i = 0; i < 2; ++i)
|
||||
|
Reference in New Issue
Block a user