diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2015-08-21 08:56:24 +0200 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2015-09-29 23:55:11 +0200 |
commit | 78cc19f15ead41909ddaf85cd5bad10036a93883 (patch) | |
tree | e1169777cba9c377a256ea224afacf6e1acd5a04 | |
parent | 98ed0716fb79004f97a8348b29557c25c21afa32 (diff) | |
download | ffmpeg-78cc19f15ead41909ddaf85cd5bad10036a93883.tar.gz |
videotoolbox: require hardware acceleration
VideoToolbox also implements a software decoder for h264, and will fallback to
using it if the file cannot be decoded on the GPU. In these cases though,
we want the hwaccel to fail so that we can use the libavcodec software decoder
instead of the Apple one.
Signed-off-by: wm4 <nfxjfg@googlemail.com>
-rw-r--r-- | libavcodec/videotoolbox.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index ca4449105d..9dec5fcafc 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -32,8 +32,8 @@ #include "h264.h" #include "mpegvideo.h" -#ifndef kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder -# define kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder CFSTR("EnableHardwareAcceleratedVideoDecoder") +#ifndef kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder +# define kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder CFSTR("RequireHardwareAcceleratedVideoDecoder") #endif #define VIDEOTOOLBOX_ESDS_EXTRADATA_PADDING 12 @@ -398,7 +398,7 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec &kCFTypeDictionaryValueCallBacks); CFDictionarySetValue(config_info, - kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder, + kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder, kCFBooleanTrue); if (avctx->extradata_size) { |