avcodec/m[jx]pegdec: Simplify freeing frame
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
7ddcd55d51
commit
1267273663
2 changed files with 2 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue