Ticket #51206: patch-xine-lib-ffmpeg-3.0.diff

File patch-xine-lib-ffmpeg-3.0.diff, 2.6 KB (added by dbevans (David B. Evans), 8 years ago)

Proposed patch allowing build with either ffmpeg 2.8 or 3.0+

  • Portfile

     
    44
    55name            xine-lib
    66version         1.2.6
    7 revision        1
     7revision        2
    88description     xine-lib is a free multimedia engine, released under the GPL.
    99long_description        ${description}
    1010maintainers     ryandesign openmaintainer
     
    4545            port:xorg-libXvMC \
    4646            port:xorg-xcb-util
    4747
    48 patchfiles-append   patch-src-post-planar-eq2.c.diff
     48patchfiles-append   patch-src-post-planar-eq2.c.diff \
     49                    patch-ffmpeg-3.0.diff
    4950
    5051# bad register name `%rax'
    5152universal_variant   no
  • files/patch-ffmpeg-3.0.diff

     
     1diff -u src/combined/ffmpeg.orig/ff_audio_decoder.c src/combined/ffmpeg/ff_audio_decoder.c
     2--- src/combined/ffmpeg.orig/ff_audio_decoder.c 2014-06-09 09:08:42.000000000 -0700
     3+++ src/combined/ffmpeg/ff_audio_decoder.c      2016-04-21 22:16:46.000000000 -0700
     4@@ -590,7 +590,7 @@
     5   int got_frame;
     6   float gain = this->class->gain;
     7   if (!this->av_frame)
     8-    this->av_frame = avcodec_alloc_frame ();
     9+    this->av_frame = av_frame_alloc ();
     10 
     11   consumed = avcodec_decode_audio4 (this->context, this->av_frame, &got_frame, &avpkt);
     12   if ((consumed >= 0) && got_frame) {
     13@@ -1071,7 +1071,7 @@
     14   /* try to reset the wma decoder */
     15   if( this->decoder_ok ) {
     16 #if AVAUDIO > 3
     17-    avcodec_free_frame (&this->av_frame);
     18+    av_frame_free (&this->av_frame);
     19 #endif
     20     pthread_mutex_lock (&ffmpeg_lock);
     21     avcodec_close (this->context);
     22@@ -1105,7 +1105,7 @@
     23 
     24   if( this->context && this->decoder_ok ) {
     25 #if AVAUDIO > 3
     26-    avcodec_free_frame (&this->av_frame);
     27+    av_frame_free (&this->av_frame);
     28 #endif
     29     pthread_mutex_lock (&ffmpeg_lock);
     30     avcodec_close (this->context);
     31diff -u src/combined/ffmpeg.orig/ff_video_decoder.c src/combined/ffmpeg/ff_video_decoder.c
     32--- src/combined/ffmpeg.orig/ff_video_decoder.c 2014-06-24 09:21:06.000000000 -0700
     33+++ src/combined/ffmpeg/ff_video_decoder.c      2016-04-21 22:14:45.000000000 -0700
     34@@ -2523,7 +2523,7 @@
     35   this->stream                            = stream;
     36   this->class                             = (ff_video_class_t *) class_gen;
     37 
     38-  this->av_frame          = avcodec_alloc_frame();
     39+  this->av_frame          = av_frame_alloc();
     40   this->context           = avcodec_alloc_context();
     41   this->context->opaque   = this;
     42 #if AVPALETTE == 1