Skip to content

Commit 541fe99

Browse files
committed
bump FFMpegRecipe and PyAVRecipe versions
1 parent 08713b3 commit 541fe99

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

pythonforandroid/recipes/av/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@
55
class PyAVRecipe(CythonRecipe):
66

77
name = "av"
8-
version = "10.0.0"
8+
version = "13.0.0"
99
url = "https://github.com/PyAV-Org/PyAV/archive/v{version}.zip"
1010

1111
depends = ["python3", "cython", "ffmpeg", "av_codecs"]
1212
opt_depends = ["openssl"]
13+
patches = ['patches/compilation_syntax_errors.patch']
14+
15+
def prebuild_arch(self, arch):
16+
self.apply_patches(arch)
1317

1418
def get_recipe_env(self, arch, with_flags_in_cc=True):
1519
env = super().get_recipe_env(arch)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/av/container/streams.pyx b/av/container/streams.pyx
2+
index 17e4992..502ac5a 100644
3+
--- a/av/container/streams.pyx
4+
+++ b/av/container/streams.pyx
5+
@@ -144,7 +144,7 @@ cdef class StreamContainer:
6+
7+
return stream_index
8+
9+
- def best(self, str type, /, Stream related = None):
10+
+ def best(self, str type, Stream related=None):
11+
"""best(type: Literal["video", "audio", "subtitle", "attachment", "data"], /, related: Stream | None)
12+
Finds the "best" stream in the file. Wraps :ffmpeg:`av_find_best_stream`. Example::
13+
14+
diff --git a/av/filter/context.pyx b/av/filter/context.pyx
15+
index b820d3d..8908b56 100644
16+
--- a/av/filter/context.pyx
17+
+++ b/av/filter/context.pyx
18+
@@ -77,7 +77,8 @@ cdef class FilterContext:
19+
20+
@property
21+
def graph(self):
22+
- if (graph := self._graph()):
23+
+ graph = self._graph()
24+
+ if graph:
25+
return graph
26+
else:
27+
raise RuntimeError("graph is unallocated")

pythonforandroid/recipes/ffmpeg/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@
44

55

66
class 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
1111
opts_depends = ['openssl', 'ffpyplayer_codecs']
12-
patches = ['patches/configure.patch']
1312

1413
def should_build(self, arch):
1514
build_dir = self.get_build_dir(arch.arch)
1615
return not exists(join(build_dir, 'lib', 'libavcodec.so'))
1716

18-
def prebuild_arch(self, arch):
19-
self.apply_patches(arch)
20-
2117
def get_recipe_env(self, arch):
2218
env = super().get_recipe_env(arch)
2319
env['NDK'] = self.ctx.ndk_dir

0 commit comments

Comments
 (0)