[packages/x262] - fix building with ffmpeg 3 - rel 3
baggins
baggins at pld-linux.org
Mon Mar 28 16:33:59 CEST 2016
commit d7dd948507f646ed44bf836f16658f8dbf8d57d9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Mar 28 16:29:35 2016 +0200
- fix building with ffmpeg 3
- rel 3
ffmpeg3.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
x262.spec | 5 ++++-
2 files changed, 46 insertions(+), 1 deletion(-)
---
diff --git a/x262.spec b/x262.spec
index a3d314d..f70e0b8 100644
--- a/x262.spec
+++ b/x262.spec
@@ -1,9 +1,10 @@
+%define rel 3
Summary: MPEG-2 encoder based on x264
Summary(pl.UTF-8): Koder MPEG-2 oparty na x264
Name: x262
Version: 0
%define snap 20150316
-Release: 0.%{snap}.2
+Release: 0.%{snap}.%{rel}
License: GPL v2+
Group: Libraries
# git clone git://git.videolan.org/x262.git
@@ -12,6 +13,7 @@ Source0: %{name}.tar.xz
Patch0: %{name}-lsmash-update.patch
Patch1: arch-buildflags.patch
Patch2: x32.patch
+Patch3: ffmpeg3.patch
URL: https://www.videolan.org/developers/x262.html
# libswscale libavformat libavcodec libavutil
BuildRequires: ffmpeg-devel >= 0.7.1
@@ -36,6 +38,7 @@ x262 to koder MPEG-2 oparty na najlepszych cechach x264.
%ifarch x32
%patch2 -p1
%endif
+%patch3 -p1
%build
%ifarch x32
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644
index 0000000..ec0fe03
--- /dev/null
+++ b/ffmpeg3.patch
@@ -0,0 +1,42 @@
+diff -ur x262.orig/input/lavf.c x262/input/lavf.c
+--- x262.orig/input/lavf.c 2015-04-05 10:06:51.000000000 +0200
++++ x262/input/lavf.c 2016-03-28 16:27:23.139384629 +0200
+@@ -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 x262.orig/x264.c x262/x264.c
+--- x262.orig/x264.c 2015-04-05 10:06:51.000000000 +0200
++++ x262/x264.c 2016-03-28 16:25:55.376774931 +0200
+@@ -436,7 +436,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/x262.git/commitdiff/d7dd948507f646ed44bf836f16658f8dbf8d57d9
More information about the pld-cvs-commit
mailing list