aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg_videotoolbox.c
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-10-01 17:58:40 +0200
committerClément Bœsch <clement@stupeflix.com>2015-10-09 10:59:31 +0200
commit8f6f357fde0ea88db180db07a6d749ef95f52c28 (patch)
tree2e3428ce2f02911d364f841fb5dd304529119792 /ffmpeg_videotoolbox.c
parent40d9d6de90c3652f4c468ab14976c7faf5e40c07 (diff)
downloadffmpeg-8f6f357fde0ea88db180db07a6d749ef95f52c28.tar.gz
build: restore videotoolbox compilation on iOS
Diffstat (limited to 'ffmpeg_videotoolbox.c')
-rw-r--r--ffmpeg_videotoolbox.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ffmpeg_videotoolbox.c b/ffmpeg_videotoolbox.c
index 6688452c04..580837efd6 100644
--- a/ffmpeg_videotoolbox.c
+++ b/ffmpeg_videotoolbox.c
@@ -16,7 +16,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#if HAVE_UTGETOSTYPEFROMSTRING
#include <CoreServices/CoreServices.h>
+#endif
#include "config.h"
#include "libavcodec/avcodec.h"
@@ -168,7 +170,13 @@ int videotoolbox_init(AVCodecContext *s)
CFStringRef pixfmt_str = CFStringCreateWithCString(kCFAllocatorDefault,
videotoolbox_pixfmt,
kCFStringEncodingUTF8);
+#if HAVE_UTGETOSTYPEFROMSTRING
vdactx->cv_pix_fmt_type = UTGetOSTypeFromString(pixfmt_str);
+#else
+ av_log(s, loglevel, "UTGetOSTypeFromString() is not available "
+ "on this platform, %s pixel format can not be honored from "
+ "the command line\n", videotoolbox_pixfmt);
+#endif
ret = av_vda_default_init2(s, vdactx);
CFRelease(pixfmt_str);
}