diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-01-17 21:30:01 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-01-17 21:30:01 +0000 |
commit | 67b0e10001ce9ef279bfe17c3715afb5861cb9dc (patch) | |
tree | ac88baf68d0cf64b6d200dddc19525c8d2db2650 /media-video/hwdecode-demos | |
parent | Be specific in the ChangeLog for WilliamH (diff) | |
download | gentoo-2-67b0e10001ce9ef279bfe17c3715afb5861cb9dc.tar.gz gentoo-2-67b0e10001ce9ef279bfe17c3715afb5861cb9dc.tar.bz2 gentoo-2-67b0e10001ce9ef279bfe17c3715afb5861cb9dc.zip |
Fix build with latest ffmpeg. Part of bug #443430
(Portage version: 2.2.0_alpha154/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'media-video/hwdecode-demos')
-rw-r--r-- | media-video/hwdecode-demos/ChangeLog | 8 | ||||
-rw-r--r-- | media-video/hwdecode-demos/files/ffmpeg-1.patch | 73 | ||||
-rw-r--r-- | media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild | 9 |
3 files changed, 85 insertions, 5 deletions
diff --git a/media-video/hwdecode-demos/ChangeLog b/media-video/hwdecode-demos/ChangeLog index d931443a0af8..113d7adfa7ef 100644 --- a/media-video/hwdecode-demos/ChangeLog +++ b/media-video/hwdecode-demos/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/hwdecode-demos -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/hwdecode-demos/ChangeLog,v 1.7 2012/11/26 14:21:48 scarabeus Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/hwdecode-demos/ChangeLog,v 1.8 2013/01/17 21:30:01 aballier Exp $ + + 17 Jan 2013; Alexis Ballier <aballier@gentoo.org> + hwdecode-demos-0.9.5.ebuild, +files/ffmpeg-1.patch: + Fix build with latest ffmpeg. Part of bug #443430 26 Nov 2012; Tomáš Chvátal <scarabeus@gentoo.org> metadata.xml: Update to global useflag. diff --git a/media-video/hwdecode-demos/files/ffmpeg-1.patch b/media-video/hwdecode-demos/files/ffmpeg-1.patch new file mode 100644 index 000000000000..f0b223e1401c --- /dev/null +++ b/media-video/hwdecode-demos/files/ffmpeg-1.patch @@ -0,0 +1,73 @@ +Index: hwdecode-demos-0.9.5/src/ffmpeg.c +=================================================================== +--- hwdecode-demos-0.9.5.orig/src/ffmpeg.c ++++ hwdecode-demos-0.9.5/src/ffmpeg.c +@@ -53,7 +53,6 @@ static int ffmpeg_init(void) + return -1; + } + +- avcodec_init(); + avcodec_register_all(); + + ffmpeg_context = ffmpeg; +@@ -148,7 +147,6 @@ static int get_buffer(struct AVCodecCont + void *surface = (void *)(uintptr_t)vaapi->surface_id; + + pic->type = FF_BUFFER_TYPE_USER; +- pic->age = 1; + pic->data[0] = surface; + pic->data[1] = NULL; + pic->data[2] = NULL; +Index: hwdecode-demos-0.9.5/src/ffmpeg_video.c +=================================================================== +--- hwdecode-demos-0.9.5.orig/src/ffmpeg_video.c ++++ hwdecode-demos-0.9.5/src/ffmpeg_video.c +@@ -23,6 +23,7 @@ + + #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H + # include <libavformat/avformat.h> ++# include <libavformat/avio.h> + #endif + #ifdef HAVE_FFMPEG_AVFORMAT_H + # include <ffmpeg/avformat.h> +@@ -59,7 +60,7 @@ + int decode(void) + { + AVProbeData pd; +- ByteIOContext ioctx; ++ AVIOContext *ioctx; + AVInputFormat *format = NULL; + AVFormatContext *ic = NULL; + AVCodec *codec; +@@ -84,15 +85,20 @@ int decode(void) + goto end; + format->flags |= AVFMT_NOFILE; + +- if (init_put_byte(&ioctx, (uint8_t *)video_data, video_data_size, 0, NULL, NULL, NULL, NULL) < 0) ++ ioctx = avio_alloc_context((uint8_t *)video_data, video_data_size, 0, NULL, NULL, NULL, NULL); ++ if (!ioctx) + goto end; + +- if (av_open_input_stream(&ic, &ioctx, "", format, NULL) < 0) ++ ic = avformat_alloc_context(); ++ if(!ic) ++ goto end; ++ ic->pb = ioctx; ++ if (avformat_open_input(&ic, "", format, NULL) < 0) + goto end; + + if (av_find_stream_info(ic) < 0) + goto end; +- dump_format(ic, 0, "", 0); ++ av_dump_format(ic, 0, "", 0); + + video_stream = NULL; + for (i = 0; i < ic->nb_streams; i++) { +@@ -135,6 +141,6 @@ end: + if (avctx) + avcodec_close(avctx); + if (ic) +- av_close_input_stream(ic); ++ avformat_close_input(&ic); + return error; + } diff --git a/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild b/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild index 649f9a1f620b..030887db0254 100644 --- a/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild +++ b/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild,v 1.3 2012/05/05 08:58:59 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild,v 1.4 2013/01/17 21:30:01 aballier Exp $ EAPI=2 @@ -22,7 +22,10 @@ RDEPEND="virtual/ffmpeg DEPEND="${RDEPEND} virtual/pkgconfig" -PATCHES=( "${FILESDIR}/ffmpeg.patch" ) +PATCHES=( + "${FILESDIR}/ffmpeg.patch" + "${FILESDIR}/ffmpeg-1.patch" + ) src_configure() { econf \ |