From: Rick Kern <ker...@gmail.com>

Removed dictionary keys that aren't supported on iOS builds.

Signed-off-by: Rick Kern <ker...@gmail.com>
---
 libavcodec/vtenc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/vtenc.c b/libavcodec/vtenc.c
index b363492..7132411 100644
--- a/libavcodec/vtenc.c
+++ b/libavcodec/vtenc.c
@@ -499,8 +499,10 @@ static av_cold int vtenc_init(AVCodecContext* avctx){
         &kCFTypeDictionaryValueCallBacks
     );
 
+#if !TARGET_OS_IPHONE
     CFDictionarySetValue(enc_info, 
kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder, 
kCFBooleanTrue);
     CFDictionarySetValue(enc_info, 
kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder, 
kCFBooleanTrue);
+#endif
 
     status = VTCompressionSessionCreate(
         kCFAllocatorDefault,
@@ -515,6 +517,7 @@ static av_cold int vtenc_init(AVCodecContext* avctx){
         &vtctx->session
     );
 
+#if !TARGET_OS_IPHONE
     if(status != 0 || !vtctx->session){
         CFDictionaryRemoveValue(enc_info, 
kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder);
 
@@ -531,6 +534,7 @@ static av_cold int vtenc_init(AVCodecContext* avctx){
             &vtctx->session
         );
     }
+#endif
 
     if(status || !vtctx->session){
         av_log(avctx, AV_LOG_ERROR, "Error: cannot create compression session: 
%d\n", status);
-- 
2.4.9 (Apple Git-60)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to