1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

lavc: do not leak the internal frame if opening the codec fails

This commit is contained in:
Anton Khirnov 2013-12-16 22:54:43 +01:00
parent 3867f3718b
commit 50079a6aa9

View File

@ -1102,8 +1102,10 @@ end:
free_and_end:
av_dict_free(&tmp);
av_freep(&avctx->priv_data);
if (avctx->internal)
if (avctx->internal) {
av_frame_free(&avctx->internal->to_free);
av_freep(&avctx->internal->pool);
}
av_freep(&avctx->internal);
avctx->codec = NULL;
goto end;