From: Zhao Zhili <[email protected]>
This can happen when user set the avctx->profile field directly
instead of specify profile via option.
---
libavcodec/videotoolboxenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 9f65519700..a313087876 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -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;
--
2.40.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".