lavc: free buffer_frame/pkt on avcodec_open2() failure

Fixes memory leaks in some FATE tests.
This commit is contained in:
Anton Khirnov 2016-08-08 13:32:54 +02:00
parent ec021d4844
commit e9bfff1cc6
1 changed files with 2 additions and 0 deletions

View File

@ -1199,6 +1199,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_freep(&avctx->priv_data);
if (avctx->internal) {
av_frame_free(&avctx->internal->to_free);
av_frame_free(&avctx->internal->buffer_frame);
av_packet_free(&avctx->internal->buffer_pkt);
av_freep(&avctx->internal->pool);
}
av_freep(&avctx->internal);