[packages/libx264] - fix building with ffmpeg 3 - rel 7

baggins baggins at pld-linux.org
Thu Mar 31 16:01:46 CEST 2016


commit a63308fea12d175e46ab19fe45113fa1f6cb9035
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Mar 31 23:01:23 2016 +0900

    - fix building with ffmpeg 3
    - rel 7

 ffmpeg3.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
 libx264.spec  |  4 +++-
 2 files changed, 45 insertions(+), 1 deletion(-)
---
diff --git a/libx264.spec b/libx264.spec
index 3063b6f..61b0b93 100644
--- a/libx264.spec
+++ b/libx264.spec
@@ -7,7 +7,7 @@
 %undefine	with_asm
 %endif
 
-%define		rel	6
+%define		rel	7
 %define		snap	20140824
 %define		snaph	2245
 Summary:	H264 encoder library
@@ -24,6 +24,7 @@ Patch0:		%{name}-alpha.patch
 Patch1:		altivec-no-vand.patch
 Patch2:		%{name}-gpac.patch
 Patch3:		x32.patch
+Patch4:		ffmpeg3.patch
 URL:		http://www.videolan.org/developers/x264.html
 BuildRequires:	pkgconfig
 %{?with_asm:BuildRequires:	yasm >= 1.2.0}
@@ -95,6 +96,7 @@ Dekoder x264 działający z linii poleceń.
 %endif
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 CC="%{__cc}" \
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644
index 0000000..34d4fcd
--- /dev/null
+++ b/ffmpeg3.patch
@@ -0,0 +1,42 @@
+diff -ur x264-snapshot-20140824-2245.orig/input/lavf.c x264-snapshot-20140824-2245/input/lavf.c
+--- x264-snapshot-20140824-2245.orig/input/lavf.c	2014-08-25 05:45:04.000000000 +0900
++++ x264-snapshot-20140824-2245/input/lavf.c	2016-03-31 22:59:10.138953287 +0900
+@@ -83,7 +83,7 @@
+     AVCodecContext *c = h->lavf->streams[h->stream_id]->codec;
+     AVPacket *pkt = p_pic->opaque;
+ 
+-    avcodec_get_frame_defaults( h->frame );
++    av_frame_unref( h->frame );
+ 
+     while( i_frame >= h->next_frame )
+     {
+@@ -153,7 +153,7 @@
+     if( !strcmp( psz_filename, "-" ) )
+         psz_filename = "pipe:";
+ 
+-    h->frame = avcodec_alloc_frame();
++    h->frame = av_frame_alloc();
+     if( !h->frame )
+         return -1;
+ 
+@@ -253,7 +253,7 @@
+     avcodec_close( h->lavf->streams[h->stream_id]->codec );
+     avformat_close_input( &h->lavf );
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
+-    avcodec_free_frame( &h->frame );
++    av_frame_free( &h->frame );
+ #else
+     av_freep( &h->frame );
+ #endif
+diff -ur x264-snapshot-20140824-2245.orig/x264.c x264-snapshot-20140824-2245/x264.c
+--- x264-snapshot-20140824-2245.orig/x264.c	2014-08-25 05:45:04.000000000 +0900
++++ x264-snapshot-20140824-2245/x264.c	2016-03-31 22:58:07.680765885 +0900
+@@ -434,7 +434,7 @@
+     printf( "                              - valid csps for `lavf' demuxer:\n" );
+     printf( INDENT );
+     size_t line_len = strlen( INDENT );
+-    for( enum PixelFormat i = AV_PIX_FMT_NONE+1; i < AV_PIX_FMT_NB; i++ )
++    for( enum AVPixelFormat i = AV_PIX_FMT_NONE+1; i < AV_PIX_FMT_NB; i++ )
+     {
+         const char *pfname = av_get_pix_fmt_name( i );
+         if( pfname )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libx264.git/commitdiff/a63308fea12d175e46ab19fe45113fa1f6cb9035



More information about the pld-cvs-commit mailing list