--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package x264
* Backport upstream fix to support GPAC >= 0.8.0. (Closes: #975441)
This fixes a regression from buster by restoring MP4 output in the x264
binary, the library is unchanged.
diff -Nru x264-0.160.3011+gitcde9a93/debian/changelog x264-0.160.3011+gitcde9a93/debian/changelog
--- x264-0.160.3011+gitcde9a93/debian/changelog 2020-07-26 17:52:56.000000000 +0300
+++ x264-0.160.3011+gitcde9a93/debian/changelog 2021-07-15 15:06:22.000000000 +0300
@@ -1,3 +1,10 @@
+x264 (2:0.160.3011+gitcde9a93-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Backport upstream fix to support GPAC >= 0.8.0. (Closes: #975441)
+
+ -- Adrian Bunk <bunk@debian.org> Thu, 15 Jul 2021 15:06:22 +0300
+
x264 (2:0.160.3011+gitcde9a93-2) unstable; urgency=medium
* Team upload
diff -Nru x264-0.160.3011+gitcde9a93/debian/patches/0001-mp4-Update-GPAC-support-to-v0.8.0-or-later.patch x264-0.160.3011+gitcde9a93/debian/patches/0001-mp4-Update-GPAC-support-to-v0.8.0-or-later.patch
--- x264-0.160.3011+gitcde9a93/debian/patches/0001-mp4-Update-GPAC-support-to-v0.8.0-or-later.patch 1970-01-01 02:00:00.000000000 +0200
+++ x264-0.160.3011+gitcde9a93/debian/patches/0001-mp4-Update-GPAC-support-to-v0.8.0-or-later.patch 2021-07-15 15:06:22.000000000 +0300
@@ -0,0 +1,58 @@
+From 7c2004b58c26da661618262c9c06b73ad3a9ff6c Mon Sep 17 00:00:00 2001
+From: "A. David" <aurelien.david@telecom-paristech.fr>
+Date: Thu, 2 Jul 2020 19:45:50 +0200
+Subject: mp4: Update GPAC support to v0.8.0 or later
+
+---
+ configure | 5 +++--
+ output/mp4.c | 6 +++++-
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+Index: x264-0.160.3011+gitcde9a93/configure
+===================================================================
+--- x264-0.160.3011+gitcde9a93.orig/configure
++++ x264-0.160.3011+gitcde9a93/configure
+@@ -1240,15 +1240,16 @@ if [ "$gpac" = "auto" -a "$lsmash" != "y
+ gpac="no"
+ GPAC_LIBS="-lgpac"
+ cc_check "" -lz && GPAC_LIBS="$GPAC_LIBS -lz"
++ cc_check "" -ldl && GPAC_LIBS="$GPAC_LIBS -ldl"
+ if [ "$SYS" = "WINDOWS" ] ; then
+ cc_check "" -lws2_32 && GPAC_LIBS="$GPAC_LIBS -lws2_32"
+ cc_check "" -lwinmm && GPAC_LIBS="$GPAC_LIBS -lwinmm"
+ fi
+ if cc_check gpac/isomedia.h "$GPAC_LIBS" "gf_isom_close(0);" ; then
+- if cc_check gpac/isomedia.h "$GPAC_LIBS" "gf_isom_set_pixel_aspect_ratio(0,0,0,0,0);" ; then
++ if cc_check gpac/isomedia.h "$GPAC_LIBS" "gf_isom_set_pixel_aspect_ratio(0,0,0,0,0,0);" ; then
+ gpac="yes"
+ else
+- echo "Warning: gpac is too old, update to 2007-06-21 UTC or later"
++ echo "Warning: gpac is too old, update to v0.8.0 or later"
+ fi
+ fi
+ fi
+Index: x264-0.160.3011+gitcde9a93/output/mp4.c
+===================================================================
+--- x264-0.160.3011+gitcde9a93.orig/output/mp4.c
++++ x264-0.160.3011+gitcde9a93/output/mp4.c
+@@ -147,7 +147,11 @@ static int close_file( hnd_t handle, int
+ {
+ uint32_t mvhd_timescale = gf_isom_get_timescale( p_mp4->p_file );
+ uint64_t tkhd_duration = (uint64_t)( mdhd_duration * ( (double)mvhd_timescale / p_mp4->i_time_res ) );
++#if GPAC_VERSION_MAJOR > 8
++ gf_isom_append_edit( p_mp4->p_file, p_mp4->i_track, tkhd_duration, sample->CTS_Offset, GF_ISOM_EDIT_NORMAL );
++#else
+ gf_isom_append_edit_segment( p_mp4->p_file, p_mp4->i_track, tkhd_duration, sample->CTS_Offset, GF_ISOM_EDIT_NORMAL );
++#endif
+ }
+ gf_isom_sample_del( &sample );
+
+@@ -233,7 +237,7 @@ static int set_param( hnd_t handle, x264
+ dw *= sar;
+ else
+ dh /= sar;
+- gf_isom_set_pixel_aspect_ratio( p_mp4->p_file, p_mp4->i_track, p_mp4->i_descidx, p_param->vui.i_sar_width, p_param->vui.i_sar_height );
++ gf_isom_set_pixel_aspect_ratio( p_mp4->p_file, p_mp4->i_track, p_mp4->i_descidx, p_param->vui.i_sar_width, p_param->vui.i_sar_height, 0 );
+ gf_isom_set_track_layout_info( p_mp4->p_file, p_mp4->i_track, dw, dh, 0, 0, 0 );
+ }
+
diff -Nru x264-0.160.3011+gitcde9a93/debian/patches/series x264-0.160.3011+gitcde9a93/debian/patches/series
--- x264-0.160.3011+gitcde9a93/debian/patches/series 2020-06-21 12:40:55.000000000 +0300
+++ x264-0.160.3011+gitcde9a93/debian/patches/series 2021-07-15 15:06:22.000000000 +0300
@@ -1,2 +1,3 @@
link_gpac_dynamically.patch
properly_detect_x32.patch
+0001-mp4-Update-GPAC-support-to-v0.8.0-or-later.patch
--- End Message ---