avcodec/videotoolbox: prefer hw_frames_ctx/hw_device_ctx over hwaccel_context
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
79e9bdf749
commit
ade89bc6de
@ -1181,7 +1181,8 @@ int ff_videotoolbox_common_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
vtctx->logctx = avctx;
|
vtctx->logctx = avctx;
|
||||||
|
|
||||||
if (avctx->hwaccel_context)
|
if (!avctx->hw_frames_ctx && !avctx->hw_device_ctx &&
|
||||||
|
avctx->hwaccel_context)
|
||||||
return videotoolbox_start(avctx);
|
return videotoolbox_start(avctx);
|
||||||
|
|
||||||
if (!avctx->hw_frames_ctx && !avctx->hw_device_ctx) {
|
if (!avctx->hw_frames_ctx && !avctx->hw_device_ctx) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user