mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/videotoolbox: create avcC even when h264 extradata is missing
Removes the avctx->extradata_size requirement when creating avcC/hvcC, since avctx->extradata is only used in the esds code path. This fixes an issue where the VideoToolbox decoder would not work unless avformat_find_stream_info() was called. Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
parent
9519983c0f
commit
403d10a8b3
|
@ -702,7 +702,7 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec
|
||||||
kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder,
|
kVTVideoDecoderSpecification_RequireHardwareAcceleratedVideoDecoder,
|
||||||
kCFBooleanTrue);
|
kCFBooleanTrue);
|
||||||
|
|
||||||
if (avctx->extradata_size) {
|
if (1) {
|
||||||
CFMutableDictionaryRef avc_info;
|
CFMutableDictionaryRef avc_info;
|
||||||
CFDataRef data = NULL;
|
CFDataRef data = NULL;
|
||||||
|
|
||||||
|
@ -713,6 +713,7 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec
|
||||||
|
|
||||||
switch (codec_type) {
|
switch (codec_type) {
|
||||||
case kCMVideoCodecType_MPEG4Video :
|
case kCMVideoCodecType_MPEG4Video :
|
||||||
|
if (avctx->extradata_size)
|
||||||
data = videotoolbox_esds_extradata_create(avctx);
|
data = videotoolbox_esds_extradata_create(avctx);
|
||||||
if (data)
|
if (data)
|
||||||
CFDictionarySetValue(avc_info, CFSTR("esds"), data);
|
CFDictionarySetValue(avc_info, CFSTR("esds"), data);
|
||||||
|
|
Loading…
Reference in New Issue