Skip to content
Snippets Groups Projects
Commit 43fee7ad authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

Merge commit '4ff670d9'


* commit '4ff670d9':
  hwaccel: Deinitialize hardware acceleration early enough

Merged-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parents 77f1199e 4ff670d9
No related branches found
No related tags found
No related merge requests found
......@@ -1210,6 +1210,11 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
memcpy(choices, fmt, (n + 1) * sizeof(*choices));
for (;;) {
if (avctx->hwaccel && avctx->hwaccel->uninit)
avctx->hwaccel->uninit(avctx);
av_freep(&avctx->internal->hwaccel_priv_data);
avctx->hwaccel = NULL;
ret = avctx->get_format(avctx, choices);
desc = av_pix_fmt_desc_get(ret);
......@@ -1218,11 +1223,6 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
break;
}
if (avctx->hwaccel && avctx->hwaccel->uninit)
avctx->hwaccel->uninit(avctx);
av_freep(&avctx->internal->hwaccel_priv_data);
avctx->hwaccel = NULL;
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
break;
if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment