Skip to content

Commit

Permalink
media-libs/xine-lib: fix build with ffmpeg git master
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.2.20.1
  • Loading branch information
aballier committed Sep 15, 2015
1 parent f4a5a23 commit a59351a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
44 changes: 44 additions & 0 deletions media-libs/xine-lib/files/ffmpeg29.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Index: xine-lib-1.2.6/src/combined/ffmpeg/ff_audio_decoder.c
===================================================================
--- xine-lib-1.2.6.orig/src/combined/ffmpeg/ff_audio_decoder.c
+++ xine-lib-1.2.6/src/combined/ffmpeg/ff_audio_decoder.c
@@ -590,7 +590,7 @@ static int ff_audio_decode (ff_audio_dec
int got_frame;
float gain = this->class->gain;
if (!this->av_frame)
- this->av_frame = avcodec_alloc_frame ();
+ this->av_frame = av_frame_alloc ();

consumed = avcodec_decode_audio4 (this->context, this->av_frame, &got_frame, &avpkt);
if ((consumed >= 0) && got_frame) {
@@ -1071,7 +1071,7 @@ static void ff_audio_reset (audio_decode
/* try to reset the wma decoder */
if( this->decoder_ok ) {
#if AVAUDIO > 3
- avcodec_free_frame (&this->av_frame);
+ av_frame_free (&this->av_frame);
#endif
pthread_mutex_lock (&ffmpeg_lock);
avcodec_close (this->context);
@@ -1105,7 +1105,7 @@ static void ff_audio_dispose (audio_deco

if( this->context && this->decoder_ok ) {
#if AVAUDIO > 3
- avcodec_free_frame (&this->av_frame);
+ av_frame_free (&this->av_frame);
#endif
pthread_mutex_lock (&ffmpeg_lock);
avcodec_close (this->context);
Index: xine-lib-1.2.6/src/combined/ffmpeg/ff_video_decoder.c
===================================================================
--- xine-lib-1.2.6.orig/src/combined/ffmpeg/ff_video_decoder.c
+++ xine-lib-1.2.6/src/combined/ffmpeg/ff_video_decoder.c
@@ -2523,7 +2523,7 @@ static video_decoder_t *ff_video_open_pl
this->stream = stream;
this->class = (ff_video_class_t *) class_gen;

- this->av_frame = avcodec_alloc_frame();
+ this->av_frame = av_frame_alloc();
this->context = avcodec_alloc_context();
this->context->opaque = this;
#if AVPALETTE == 1
3 changes: 2 additions & 1 deletion media-libs/xine-lib/xine-lib-1.2.6-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

EAPI=5

inherit flag-o-matic libtool multilib
inherit flag-o-matic libtool multilib eutils

if [[ ${PV} == *9999* ]]; then
EHG_REPO_URI="http://hg.debian.org/hg/xine-lib/xine-lib-1.2"
Expand Down Expand Up @@ -130,6 +130,7 @@ src_prepare() {
for x in 0 1 2 3; do
sed -i -e "/^O${x}_CFLAGS=\"-O${x}\"/d" configure || die
done
has_version '>=media-video/ffmpeg-2.9' && epatch "${FILESDIR}/ffmpeg29.patch"
}

src_configure() {
Expand Down

0 comments on commit a59351a

Please sign in to comment.