Update x264 to api 0.161 (stable branch)

el9
Sérgio M. Basto 4 years ago
parent 588fb34831
commit df59d86d1a

@ -1,48 +0,0 @@
diff --git a/configure b/configure
index 51c896e901c5d4bb3ac4408e005380f64fb8f230..78aa11404e414db6168aef920e7e6bdaf5636d7d 100755
--- a/configure
+++ b/configure
@@ -1232,15 +1232,16 @@ if [ "$gpac" = "auto" -a "$lsmash" != "yes" ] ; then
for lib in -lz -lssl -lcrypto -lpng -ljpeg -ldl -llzma -lgpac -lGL -lGLU -lavdevice -lavfilter -lfaad -lmad -lxvidcore -la52 -lvorbis -ltheora -lopenjp2; do
cc_check "" $lib && GPAC_LIBS="$GPAC_LIBS $lib"
done
+ 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
diff --git a/output/mp4.c b/output/mp4.c
index 944e777113c4919520aeae131b542b9b2e0d3366..200cb33a9a19ae41c74f8b057cea3fdd0daf71af 100644
--- a/output/mp4.c
+++ b/output/mp4.c
@@ -147,7 +147,11 @@ static int close_file( hnd_t handle, int64_t largest_pts, int64_t second_largest
{
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_param_t *p_param )
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 );
}

@ -1,13 +1,13 @@
--- ./configure.orig 2019-03-12 00:41:42.000000000 +0000
+++ ./configure 2019-03-12 01:10:12.603640526 +0000
@@ -1207,7 +1207,9 @@ fi
--- ./configure.orig 2020-11-22 22:49:29.765327990 +0000
+++ ./configure 2020-11-23 01:07:38.050590012 +0000
@@ -1244,9 +1244,7 @@ fi
if [ "$gpac" = "auto" -a "$lsmash" != "yes" ] ; then
gpac="no"
GPAC_LIBS="-lgpac_static"
- GPAC_LIBS="-lgpac_static"
- cc_check "" -lz && GPAC_LIBS="$GPAC_LIBS -lz"
+ for lib in -lz -lssl -lcrypto -lpng -ljpeg -ldl -llzma -lgpac -lGL -lGLU -lavdevice -lavfilter -lfaad -lmad -lxvidcore -la52 -lvorbis -ltheora -lopenjp2; do
+ cc_check "" $lib && GPAC_LIBS="$GPAC_LIBS $lib"
+ done
- cc_check "" -ldl && GPAC_LIBS="$GPAC_LIBS -ldl"
+ GPAC_LIBS="$($PKGCONFIG --static --libs gpac)"
if [ "$SYS" = "WINDOWS" ] ; then
cc_check "" -lws2_32 && GPAC_LIBS="$GPAC_LIBS -lws2_32"
cc_check "" -lwinmm && GPAC_LIBS="$GPAC_LIBS -lwinmm"

@ -1,7 +1,7 @@
# globals for x264-0.160-20200702gitcde9a93.tar.bz2
%global api 160
%global gitdate 20200702
%global gitversion cde9a93
# globals for x264-0.161-20200912gitd198931.tar.bz2
%global api 161
%global gitdate 20200912
%global gitversion d198931
%global snapshot %{gitdate}git%{gitversion}
%global gver .%{gitdate}git%{gitversion}
@ -41,7 +41,7 @@
Summary: H264/AVC video streams encoder
Name: x264
Version: 0.%{api}
Release: 2%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist}
Release: 1%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist}
License: GPLv2+
URL: https://www.videolan.org/developers/x264.html
Source0: %{name}-0.%{api}-%{snapshot}.tar.bz2
@ -53,10 +53,9 @@ Patch0: x264-nover.patch
Patch1: x264-10b.patch
Patch10: x264-gpac.patch
Patch11: x264-opencl.patch
Patch12: 7c2004b58c26da661618262c9c06b73ad3a9ff6c.diff
BuildRequires: gcc
%{!?_without_gpac:BuildRequires: gpac-devel-static zlib-devel openssl-devel libpng-devel libjpeg-devel xz-devel libglvnd-devel mesa-libGLU-devel faad2-devel libmad-devel xvidcore-devel a52dec-devel libvorbis-devel libtheora-devel openjpeg2-devel }
%{!?_without_gpac:BuildRequires: gpac-static >= 1.0.1 zlib-devel openssl-devel libpng-devel libjpeg-devel xz-devel libglvnd-devel mesa-libGLU-devel faad2-devel libmad-devel xvidcore-devel a52dec-devel libvorbis-devel libtheora-devel openjpeg2-devel }
%{!?_without_libavformat:BuildRequires: ffmpeg-devel}
%{?_with_ffmpegsource:BuildRequires: ffmpegsource-devel}
# https://bugzilla.rpmfusion.org/show_bug.cgi?id=3975
@ -111,7 +110,6 @@ pushd %{name}-0.%{api}-%{snapshot}
%patch1 -p1 -b .10b
%patch10 -p1 -b .gpac
%patch11 -p1 -b .opencl
%patch12 -p1 -b .gpac8
popd
variants="generic generic10"
@ -219,6 +217,9 @@ install -pm644 generic/{AUTHORS,COPYING} %{buildroot}%{_pkgdocdir}/
%endif
%changelog
* Wed Nov 18 2020 Sérgio Basto <sergio@serjux.com> - 0.161-1.20200912gitd198931
- Update x264 to api 0.161 (stable branch)
* Wed Aug 19 2020 RPM Fusion Release Engineering <leigh123linux@gmail.com> - 0.160-2.20200702gitcde9a93
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

Loading…
Cancel
Save