You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Merge commit '4ff670d99bebd97429322719089363d83143477d'
* commit '4ff670d99bebd97429322719089363d83143477d': hwaccel: Deinitialize hardware acceleration early enough Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1210,6 +1210,11 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
|
|||||||
memcpy(choices, fmt, (n + 1) * sizeof(*choices));
|
memcpy(choices, fmt, (n + 1) * sizeof(*choices));
|
||||||
|
|
||||||
for (;;) {
|
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);
|
ret = avctx->get_format(avctx, choices);
|
||||||
|
|
||||||
desc = av_pix_fmt_desc_get(ret);
|
desc = av_pix_fmt_desc_get(ret);
|
||||||
@@ -1218,11 +1223,6 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
|
|||||||
break;
|
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))
|
if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))
|
||||||
break;
|
break;
|
||||||
if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
|
if (avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
|
||||||
|
Reference in New Issue
Block a user