mirror of https://git.ffmpeg.org/ffmpeg.git
lavc: do not leak the internal frame if opening the codec fails
This commit is contained in:
parent
3867f3718b
commit
50079a6aa9
|
@ -1102,8 +1102,10 @@ end:
|
||||||
free_and_end:
|
free_and_end:
|
||||||
av_dict_free(&tmp);
|
av_dict_free(&tmp);
|
||||||
av_freep(&avctx->priv_data);
|
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->pool);
|
||||||
|
}
|
||||||
av_freep(&avctx->internal);
|
av_freep(&avctx->internal);
|
||||||
avctx->codec = NULL;
|
avctx->codec = NULL;
|
||||||
goto end;
|
goto end;
|
||||||
|
|
Loading…
Reference in New Issue