mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/videotoolboxenc: inherit profile from AVCodecContext
This can happen when user set the avctx->profile field directly instead of specify profile via option. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
parent
3fafc842f1
commit
f66e1862e3
@ -1746,6 +1746,9 @@ static av_cold int vtenc_init(AVCodecContext *avctx)
|
||||
pthread_mutex_init(&vtctx->lock, NULL);
|
||||
pthread_cond_init(&vtctx->cv_sample_sent, NULL);
|
||||
|
||||
// It can happen when user set avctx->profile directly.
|
||||
if (vtctx->profile == FF_PROFILE_UNKNOWN)
|
||||
vtctx->profile = avctx->profile;
|
||||
vtctx->session = NULL;
|
||||
status = vtenc_configure_encoder(avctx);
|
||||
if (status) return status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user