diff options
author | Dan Dennedy <dan@dennedy.org> | 2016-06-19 14:55:18 -0700 |
---|---|---|
committer | Rick Kern <kernrj@gmail.com> | 2016-06-19 21:52:56 -0400 |
commit | b8d754c5d0a2e99022c27bd1159ea3f597f67452 (patch) | |
tree | 0a160601c7b31ad08c9c40e3a54f68b98571aff9 /libavcodec/videotoolbox.c | |
parent | e07b8d68f5ee7da3a0f4c5b9063b928d7c35a9a9 (diff) |
lavc/videotoolbox: Fix videotoolbox compile error on OS X 10.8.
Fixes error:
libavcodec/videotoolbox.c:511:18: error: implicit declaration of function
'CMVideoFormatDescriptionCreateFromH264ParameterSets' is invalid in C99
This was added in 10.9:
https://developer.apple.com/reference/coremedia/1489818-cmvideoformatdescriptioncreatefr?language=objc
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r-- | libavcodec/videotoolbox.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 502b2e39a9..7b5245a410 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -495,6 +495,8 @@ static CMVideoFormatDescriptionRef videotoolbox_format_desc_create(AVCodecContex { CMFormatDescriptionRef cm_fmt_desc = NULL; int status; + +#if TARGET_OS_IPHONE || defined(__MAC_10_9) H264Context *h = codec_type == kCMVideoCodecType_H264 ? avctx->priv_data : NULL; if (h && h->ps.sps->data_size && h->ps.pps->data_size) { @@ -522,6 +524,7 @@ static CMVideoFormatDescriptionRef videotoolbox_format_desc_create(AVCodecContex return NULL; } } else { +#endif status = CMVideoFormatDescriptionCreate(kCFAllocatorDefault, codec_type, width, @@ -533,7 +536,9 @@ static CMVideoFormatDescriptionRef videotoolbox_format_desc_create(AVCodecContex av_log(avctx, AV_LOG_ERROR, "Error creating format description: %d\n", status); return NULL; } +#if TARGET_OS_IPHONE || defined(__MAC_10_9) } +#endif return cm_fmt_desc; } |