44
55
66class FFMpegRecipe (Recipe ):
7- version = 'n4.3.1 '
7+ version = 'n6.1.2 '
88 # Moved to github.com instead of ffmpeg.org to improve download speed
99 url = 'https://github.com/FFmpeg/FFmpeg/archive/{version}.zip'
1010 depends = ['sdl2' ] # Need this to build correct recipe order
11- opts_depends = ['openssl' , 'ffpyplayer_codecs' ]
11+ opts_depends = ['openssl' , 'ffpyplayer_codecs' , 'av_codecs' ]
1212 patches = ['patches/configure.patch' ]
1313
1414 def should_build (self , arch ):
1515 build_dir = self .get_build_dir (arch .arch )
1616 return not exists (join (build_dir , 'lib' , 'libavcodec.so' ))
1717
18- def prebuild_arch (self , arch ):
19- self .apply_patches (arch )
20-
2118 def get_recipe_env (self , arch ):
2219 env = super ().get_recipe_env (arch )
2320 env ['NDK' ] = self .ctx .ndk_dir
@@ -43,7 +40,9 @@ def build_arch(self, arch):
4340 '-DOPENSSL_API_COMPAT=0x10002000L' ]
4441 ldflags += ['-L' + build_dir ]
4542
46- if 'ffpyplayer_codecs' in self .ctx .recipe_build_order :
43+ codecs_opts = {"ffpyplayer_codecs" , "av_codecs" }
44+ if codecs_opts .intersection (self .ctx .recipe_build_order ):
45+
4746 # Enable GPL
4847 flags += ['--enable-gpl' ]
4948
@@ -52,7 +51,9 @@ def build_arch(self, arch):
5251 build_dir = Recipe .get_recipe (
5352 'libx264' , self .ctx ).get_build_dir (arch .arch )
5453 cflags += ['-I' + build_dir + '/include/' ]
55- ldflags += ['-lx264' , '-L' + build_dir + '/lib/' ]
54+ # Newer versions of FFmpeg prioritize the dynamic library and ignore
55+ # the static one, unless the static library path is explicitly set.
56+ ldflags += [build_dir + '/lib/' + 'libx264.a' ]
5657
5758 # libshine
5859 flags += ['--enable-libshine' ]
0 commit comments