Browse Source

Don't pass internal avcodec option when avcodec library not included

It causes initialization to fail when built with -w option.

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Brion Vibber 10 years ago
parent
commit
8672d91f8a
2 changed files with 9 additions and 1 deletions
  1. 2 0
      Sources/VLCLibrary.m
  2. 7 1
      buildMobileVLCKit.sh

+ 2 - 0
Sources/VLCLibrary.m

@@ -103,7 +103,9 @@ static VLCLibrary * sharedLibrary = nil;
                       @"--no-osd",
                       @"--no-video-title-show",
                       @"--no-stats",
+#ifndef NOSCARYCODECS
                       @"--avcodec-fast",
+#endif
                       @"--verbose=0",
                       @"--text-renderer=quartztext",
                       @"--avi-index=3",

+ 7 - 1
buildMobileVLCKit.sh

@@ -60,11 +60,17 @@ buildxcodeproj()
 
     info "Building $1 ($target, ${CONFIGURATION})"
 
+    local defs="$GCC_PREPROCESSOR_DEFINITIONS"
+    if [ "$SCARY" = "no" ]; then
+        defs="$defs NOSCARYCODECS"
+    fi
     xcodebuild -project "$1.xcodeproj" \
                -target "$target" \
                -sdk $PLATFORM$SDK \
                -configuration ${CONFIGURATION} \
-               IPHONEOS_DEPLOYMENT_TARGET=${SDK_MIN} > ${out}
+               IPHONEOS_DEPLOYMENT_TARGET=${SDK_MIN} \
+               GCC_PREPROCESSOR_DEFINITIONS="$defs" \
+               > ${out}
 }
 
 while getopts "hvwsfdnlk:" OPTION