diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index a4125f17b5..69327cd798 100644 --- a/libavcodec/smvjpegdec.c +++ b/libavcodec/smvjpegdec.c @@ -180,13 +180,14 @@ static av_cold int smvjpeg_decode_end(AVCodecContext *avctx) { SMVJpegDecodeContext *s = avctx->priv_data; MJpegDecodeContext *jpg = &s->jpg; + int ret; jpg->picture_ptr = NULL; av_frame_free(&s->picture[0]); av_frame_free(&s->picture[1]); - avcodec_close(s->avctx); + ret = avcodec_close(s->avctx); av_freep(&s->avctx); - return 0; + return ret; } static const AVClass smvjpegdec_class = {