avcodec/utils: fix minor memory leaks on avcodec_open2() failure
authorwm4 <nfxjfg@googlemail.com>
Fri, 22 Apr 2016 17:29:48 +0000 (19:29 +0200)
committerwm4 <nfxjfg@googlemail.com>
Fri, 22 Apr 2016 17:29:48 +0000 (19:29 +0200)
libavcodec/utils.c

index 52e0d92..946ecb9 100644 (file)
@@ -1670,6 +1670,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
     av_dict_free(&tmp);
     av_freep(&avctx->priv_data);
     if (avctx->internal) {
+        av_packet_free(&avctx->internal->buffer_pkt);
+        av_frame_free(&avctx->internal->buffer_frame);
         av_frame_free(&avctx->internal->to_free);
         av_freep(&avctx->internal->pool);
     }