diff options
author | Alexis Ballier <aballier@gentoo.org> | 2011-12-03 15:58:14 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2011-12-03 15:58:14 +0000 |
commit | 51be62eebb55715ab201896c0903e473d5bebf06 (patch) | |
tree | d83394009562467eb7ae6a446e2509427849688d /media-video | |
parent | Restrict tests, bug 392993 (diff) | |
download | gentoo-2-51be62eebb55715ab201896c0903e473d5bebf06.tar.gz gentoo-2-51be62eebb55715ab201896c0903e473d5bebf06.tar.bz2 gentoo-2-51be62eebb55715ab201896c0903e473d5bebf06.zip |
fix build with ffmpeg 0.8, bug #392695
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/motion/ChangeLog | 6 | ||||
-rw-r--r-- | media-video/motion/files/ffmpeg08.patch | 53 | ||||
-rw-r--r-- | media-video/motion/motion-3.2.12-r1.ebuild | 6 |
3 files changed, 63 insertions, 2 deletions
diff --git a/media-video/motion/ChangeLog b/media-video/motion/ChangeLog index 05533192d539..1e8e7ace6518 100644 --- a/media-video/motion/ChangeLog +++ b/media-video/motion/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-video/motion # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.36 2011/11/14 03:46:46 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.37 2011/12/03 15:58:14 aballier Exp $ + + 03 Dec 2011; Alexis Ballier <aballier@gentoo.org> +files/ffmpeg08.patch, + motion-3.2.12-r1.ebuild: + fix build with ffmpeg 0.8, bug #392695 14 Nov 2011; Samuli Suominen <ssuominen@gentoo.org> -motion-3.2.11.1.ebuild, -motion-3.2.12.ebuild, -files/motion.init-r1, -files/motion.initd: diff --git a/media-video/motion/files/ffmpeg08.patch b/media-video/motion/files/ffmpeg08.patch new file mode 100644 index 000000000000..f6743e36fad4 --- /dev/null +++ b/media-video/motion/files/ffmpeg08.patch @@ -0,0 +1,53 @@ +Index: motion-3.2.12/ffmpeg.c +=================================================================== +--- motion-3.2.12.orig/ffmpeg.c ++++ motion-3.2.12/ffmpeg.c +@@ -60,6 +60,10 @@ + */ + #define APPEND_PROTO "appfile" + ++#ifndef guess_format ++#define guess_format av_guess_format ++#endif ++ + /* Some forward-declarations. */ + void ffmpeg_put_frame(struct ffmpeg *, AVFrame *); + void ffmpeg_cleanups(struct ffmpeg *); +@@ -228,7 +232,9 @@ void ffmpeg_init() + mpeg1_file_protocol.url_close = file_protocol.url_close; + + /* Register the append file protocol. */ +-#if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) ++#if LIBAVFORMAT_BUILD >= (53<<16 ) ++ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol)); ++#elif LIBAVFORMAT_BUILD >= (52<<16 | 31<<8) + av_register_protocol(&mpeg1_file_protocol); + #else + register_protocol(&mpeg1_file_protocol); +@@ -377,7 +383,7 @@ struct ffmpeg *ffmpeg_open(char *ffmpeg_ + + ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st); + c->codec_id = ffmpeg->oc->oformat->video_codec; +- c->codec_type = CODEC_TYPE_VIDEO; ++ c->codec_type = AVMEDIA_TYPE_VIDEO; + is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO; + + if (strcmp(ffmpeg_video_codec, "ffv1") == 0) +@@ -646,7 +652,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm + if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) { + /* raw video case. The API will change slightly in the near future for that */ + #ifdef FFMPEG_AVWRITEFRAME_NEWAPI +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + pkt.data = (uint8_t *)pic; + pkt.size = sizeof(AVPicture); + ret = av_write_frame(ffmpeg->oc, &pkt); +@@ -667,7 +673,7 @@ void ffmpeg_put_frame(struct ffmpeg *ffm + #ifdef FFMPEG_AVWRITEFRAME_NEWAPI + pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts; + if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) { +- pkt.flags |= PKT_FLAG_KEY; ++ pkt.flags |= AV_PKT_FLAG_KEY; + } + pkt.data = ffmpeg->video_outbuf; + pkt.size = out_size; diff --git a/media-video/motion/motion-3.2.12-r1.ebuild b/media-video/motion/motion-3.2.12-r1.ebuild index bef0fce140e1..feac6d4cc1b5 100644 --- a/media-video/motion/motion-3.2.12-r1.ebuild +++ b/media-video/motion/motion-3.2.12-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r1.ebuild,v 1.2 2011/10/06 08:06:36 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r1.ebuild,v 1.3 2011/12/03 15:58:14 aballier Exp $ EAPI=4 inherit eutils @@ -26,6 +26,10 @@ pkg_setup() { enewuser motion -1 -1 -1 video } +src_prepare() { + epatch "${FILESDIR}/ffmpeg08.patch" +} + src_configure() { local hack if has_version '>=sys-kernel/linux-headers-2.6.38'; then |