X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Favrndec.c;h=f4ec490de5e3107ec0c5224fca9f4af09ee39fae;hb=82b6f4b5563fccfbe21ea1b4e14109ce1f57ef2d;hp=104ff2d9048ee12f0f1d0467bbd27b59bd43717f;hpb=5ab44ff20cdc0e05adecbd0cd352d25fcb930094;p=ffmpeg diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c index 104ff2d9048..f4ec490de5e 100644 --- a/libavcodec/avrndec.c +++ b/libavcodec/avrndec.c @@ -46,7 +46,7 @@ static av_cold int init(AVCodecContext *avctx) } if(a->is_mjpeg) { - AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MJPEG); + const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MJPEG); AVDictionary *thread_opt = NULL; if (!codec) { av_log(avctx, AV_LOG_ERROR, "MJPEG codec not found\n"); @@ -91,8 +91,7 @@ static av_cold int end(AVCodecContext *avctx) { AVRnContext *a = avctx->priv_data; - avcodec_close(a->mjpeg_avctx); - av_freep(&a->mjpeg_avctx); + avcodec_free_context(&a->mjpeg_avctx); return 0; }