]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/videotoolboxenc: Set profile (main/main10) on HEVC encode
authorHarry Mallon <harry.mallon@codex.online>
Mon, 21 Sep 2020 11:16:58 +0000 (12:16 +0100)
committerRick Kern <kernrj@gmail.com>
Tue, 29 Sep 2020 00:46:05 +0000 (20:46 -0400)
Signed-off-by: Harry Mallon <harry.mallon@codex.online>
Signed-off-by: Rick Kern <kernrj@gmail.com>
libavcodec/videotoolboxenc.c

index e89cfaeed85450396e324de8b4600d931670f8f1..212f41b19a29952348c917b79228e8e8468817c2 100644 (file)
@@ -1114,15 +1114,12 @@ static int vtenc_create_encoder(AVCodecContext   *avctx,
         }
     }
 
-    if (vtctx->codec_id == AV_CODEC_ID_H264) {
-        // kVTCompressionPropertyKey_ProfileLevel is not available for HEVC
-        if (profile_level) {
-            status = VTSessionSetProperty(vtctx->session,
-                                        kVTCompressionPropertyKey_ProfileLevel,
-                                        profile_level);
-            if (status) {
-                av_log(avctx, AV_LOG_ERROR, "Error setting profile/level property: %d. Output will be encoded using a supported profile/level combination.\n", status);
-            }
+    if (profile_level) {
+        status = VTSessionSetProperty(vtctx->session,
+                                      kVTCompressionPropertyKey_ProfileLevel,
+                                      profile_level);
+        if (status) {
+            av_log(avctx, AV_LOG_ERROR, "Error setting profile/level property: %d. Output will be encoded using a supported profile/level combination.\n", status);
         }
     }