Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
arch: x86_64
- os: ubuntu-24.04-arm
arch: aarch64
- os: ubuntu-24.04
arch: armv7l
- os: ubuntu-24.04
arch: x86_64
- os: windows-latest
Expand All @@ -45,6 +47,11 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Set up QEMU
if: matrix.arch == 'armv7l'
uses: docker/setup-qemu-action@v3
with:
platforms: arm
- name: Set Minimum MacOS Target
if: runner.os == 'macOS'
run: |
Expand All @@ -67,6 +74,7 @@ jobs:
CIBW_SKIP: "cp310-win_arm64"
CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m pytest {package}/tests && mv {project}/av.disabled {project}/av
CIBW_TEST_REQUIRES: pytest numpy
CIBW_TEST_SKIP: "*_armv7l"
run: |
pip install cibuildwheel delvewheel
cibuildwheel --output-dir dist
Expand Down
1 change: 1 addition & 0 deletions av/subtitles/codeccontext.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ from av.packet cimport Packet

cdef class SubtitleCodecContext(CodecContext):
cdef bint subtitle_header_set
cpdef decode(self, Packet packet=?)
cpdef decode2(self, Packet packet)
11 changes: 11 additions & 0 deletions scripts/fetch-vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import platform
import subprocess
import time


def get_platform():
Expand Down Expand Up @@ -51,3 +52,13 @@ def get_platform():

logging.info(f"Extracting {tarball_name}")
subprocess.check_call(["tar", "-C", args.destination_dir, "-xf", tarball_file])

# Some tarball members carry pre-1980 mtimes, which the ZIP format (and thus
# delvewheel's wheel repackaging) cannot represent. Bump any such file to now.
ZIP_EPOCH = 315532800 # 1980-01-01 00:00:00 UTC
now = time.time()
for root, _, files in os.walk(args.destination_dir):
for name in files:
path = os.path.join(root, name)
if os.path.getmtime(path) < ZIP_EPOCH:
os.utime(path, (now, now))
2 changes: 1 addition & 1 deletion scripts/ffmpeg-8.1.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-1/ffmpeg-{platform}.tar.gz"
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-2/ffmpeg-{platform}.tar.gz"
}
2 changes: 1 addition & 1 deletion scripts/ffmpeg-latest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-1/ffmpeg-{platform}.tar.gz"
"url": "https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/8.1.1-2/ffmpeg-{platform}.tar.gz"
}
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ def parse_cflags(raw_flags):

IMPORT_NAME = "av"

# Newer compilers treat incompatible pointer types as an error by default;
# downgrade it back to a warning so FFmpeg API churn doesn't break the build.
extra_compile_args = []
if platform.system() != "Windows":
extra_compile_args.append("-Wno-error=incompatible-pointer-types")

loudnorm_extension = Extension(
f"{IMPORT_NAME}.filter.loudnorm",
sources=[
Expand All @@ -151,6 +157,7 @@ def parse_cflags(raw_flags):
libraries=extension_extra["libraries"],
library_dirs=extension_extra["library_dirs"],
define_macros=define_macros,
extra_compile_args=extra_compile_args,
py_limited_api=py_limited_api,
)

Expand Down Expand Up @@ -197,6 +204,7 @@ def parse_cflags(raw_flags):
library_dirs=extension_extra["library_dirs"],
sources=[pyx_path],
define_macros=define_macros,
extra_compile_args=extra_compile_args,
py_limited_api=py_limited_api,
),
compiler_directives=compiler_directives,
Expand Down
Loading