aballier    15/02/12 08:46:29

  Added:                ffmpeg25.patch
  Log:
  fix build with ffmpeg 2.5, bug #536526
  
  Signed-off-by: aball...@gentoo.org
  (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 
160F534A)

Revision  Changes    Path
1.1                  media-video/gpac/files/ffmpeg25.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/gpac/files/ffmpeg25.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-video/gpac/files/ffmpeg25.patch?rev=1.1&content-type=text/plain

Index: ffmpeg25.patch
===================================================================
Add proper versionned checks for avformat_close_input
https://bugs.gentoo.org/show_bug.cgi?id=536526

diff --git a/modules/ffmpeg_in/ffmpeg_demux.c b/modules/ffmpeg_in/ffmpeg_demux.c
index a5202ee..975a945 100644
--- a/modules/ffmpeg_in/ffmpeg_demux.c
+++ b/modules/ffmpeg_in/ffmpeg_demux.c
@@ -301,7 +301,7 @@ static Bool FFD_CanHandleURL(GF_InputService *plug, const 
char *url)
        }
 
 exit:
-#ifndef FF_API_CLOSE_INPUT_FILE
+#if LIBAVFORMAT_VERSION_MAJOR < 54
        if (ctx) av_close_input_file(ctx);
 #else
        if (ctx) avformat_close_input(&ctx);
@@ -680,7 +680,7 @@ static GF_Err FFD_ConnectService(GF_InputService *plug, 
GF_ClientService *serv,
 
                ffd->seekable = (av_seek_frame(ffd->ctx, -1, 0, 
AVSEEK_FLAG_BACKWARD)<0) ? 0 : 1;
                if (!ffd->seekable) {
-#ifndef FF_API_CLOSE_INPUT_FILE
+#if LIBAVFORMAT_VERSION_MAJOR < 54
                        av_close_input_file(ffd->ctx);
 #else
                        avformat_close_input(&ffd->ctx);
@@ -699,7 +699,7 @@ static GF_Err FFD_ConnectService(GF_InputService *plug, 
GF_ClientService *serv,
 
 err_exit:
        GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[FFMPEG] Error opening file 
%s: %s\n", url, gf_error_to_string(e)));
-#ifndef FF_API_CLOSE_INPUT_FILE
+#if LIBAVFORMAT_VERSION_MAJOR < 54
        if (ffd->ctx) av_close_input_file(ffd->ctx);
 #else
        if (ffd->ctx) avformat_close_input(&ffd->ctx);
@@ -757,7 +757,7 @@ static GF_Err FFD_CloseService(GF_InputService *plug)
 
        ffd->is_running = 0;
 
-#ifndef FF_API_CLOSE_INPUT_FILE
+#if LIBAVFORMAT_VERSION_MAJOR < 54
        if (ffd->ctx) av_close_input_file(ffd->ctx);
 #else
        if (ffd->ctx) avformat_close_input(&ffd->ctx);




Reply via email to