Browse Source

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

tags/n2.2-rc1
Anton Khirnov 11 years ago
parent
commit
50079a6aa9
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/utils.c

+ 3
- 1
libavcodec/utils.c 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;


Loading…
Cancel
Save