You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/videotoolbox: remove unnecessary if statement
Cosmetic change only. Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
@@ -702,45 +702,43 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec
|
|||||||
kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder,
|
kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder,
|
||||||
kCFBooleanTrue);
|
kCFBooleanTrue);
|
||||||
|
|
||||||
if (1) {
|
CFMutableDictionaryRef avc_info;
|
||||||
CFMutableDictionaryRef avc_info;
|
CFDataRef data = NULL;
|
||||||
CFDataRef data = NULL;
|
|
||||||
|
|
||||||
avc_info = CFDictionaryCreateMutable(kCFAllocatorDefault,
|
avc_info = CFDictionaryCreateMutable(kCFAllocatorDefault,
|
||||||
1,
|
1,
|
||||||
&kCFTypeDictionaryKeyCallBacks,
|
&kCFTypeDictionaryKeyCallBacks,
|
||||||
&kCFTypeDictionaryValueCallBacks);
|
&kCFTypeDictionaryValueCallBacks);
|
||||||
|
|
||||||
switch (codec_type) {
|
|
||||||
case kCMVideoCodecType_MPEG4Video :
|
|
||||||
if (avctx->extradata_size)
|
|
||||||
data = videotoolbox_esds_extradata_create(avctx);
|
|
||||||
if (data)
|
|
||||||
CFDictionarySetValue(avc_info, CFSTR("esds"), data);
|
|
||||||
break;
|
|
||||||
case kCMVideoCodecType_H264 :
|
|
||||||
data = ff_videotoolbox_avcc_extradata_create(avctx);
|
|
||||||
if (data)
|
|
||||||
CFDictionarySetValue(avc_info, CFSTR("avcC"), data);
|
|
||||||
break;
|
|
||||||
case kCMVideoCodecType_HEVC :
|
|
||||||
data = ff_videotoolbox_hvcc_extradata_create(avctx);
|
|
||||||
if (data)
|
|
||||||
CFDictionarySetValue(avc_info, CFSTR("hvcC"), data);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
CFDictionarySetValue(config_info,
|
|
||||||
kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms,
|
|
||||||
avc_info);
|
|
||||||
|
|
||||||
|
switch (codec_type) {
|
||||||
|
case kCMVideoCodecType_MPEG4Video :
|
||||||
|
if (avctx->extradata_size)
|
||||||
|
data = videotoolbox_esds_extradata_create(avctx);
|
||||||
if (data)
|
if (data)
|
||||||
CFRelease(data);
|
CFDictionarySetValue(avc_info, CFSTR("esds"), data);
|
||||||
|
break;
|
||||||
CFRelease(avc_info);
|
case kCMVideoCodecType_H264 :
|
||||||
|
data = ff_videotoolbox_avcc_extradata_create(avctx);
|
||||||
|
if (data)
|
||||||
|
CFDictionarySetValue(avc_info, CFSTR("avcC"), data);
|
||||||
|
break;
|
||||||
|
case kCMVideoCodecType_HEVC :
|
||||||
|
data = ff_videotoolbox_hvcc_extradata_create(avctx);
|
||||||
|
if (data)
|
||||||
|
CFDictionarySetValue(avc_info, CFSTR("hvcC"), data);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CFDictionarySetValue(config_info,
|
||||||
|
kCMFormatDescriptionExtension_SampleDescriptionExtensionAtoms,
|
||||||
|
avc_info);
|
||||||
|
|
||||||
|
if (data)
|
||||||
|
CFRelease(data);
|
||||||
|
|
||||||
|
CFRelease(avc_info);
|
||||||
return config_info;
|
return config_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user