Source: gpac Version: 0.5.0+svn5324~dfsg1-1 Severity: important Dear maintainer,
the gpac version currently in unstable relies on FF_API_CLOSE_INPUT_FILE being defined in the avformat.h header. However this is a private define, since it starts with FF_ and not with AV_. Therefore it can be removed at any time without being considered an API break. This has happened in FFmpeg 2.5 (and Libav git master). Attached patch fixes this. It is based on upstream changes, with one additional change. Upstream uses: #ifndef FF_API_CLOSE_INPUT_FILE #define FF_API_CLOSE_INPUT_FILE 1 #endif However the define in libavformat was: #ifndef FF_API_CLOSE_INPUT_FILE #define FF_API_CLOSE_INPUT_FILE (LIBAVFORMAT_VERSION_MAJOR < 56) #endif This is necessary to be able to build against FFmpeg > 2.5. Best regards, Andreas
--- /dev/null +++ b/debian/patches/FF_API_CLOSE_INPUT_FILE.patch @@ -0,0 +1,54 @@ +Description: Stop relying on private libavformat defines + +Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com> +Origin: upstream, https://github.com/gpac/gpac/commit/9df6fe85aba08944ef03b610c4d5efe1aaaca578, https://github.com/gpac/gpac/commit/5f8358a17736e1cd692b7330dbe7e17ae3693a0a + +--- gpac-0.5.0+svn5324~dfsg1.orig/modules/ffmpeg_in/ffmpeg_demux.c ++++ gpac-0.5.0+svn5324~dfsg1/modules/ffmpeg_in/ffmpeg_demux.c +@@ -61,6 +61,10 @@ + #define FF_API_FORMAT_PARAMETERS 1 + #endif + ++#ifndef FF_API_CLOSE_INPUT_FILE ++#define FF_API_CLOSE_INPUT_FILE (LIBAVFORMAT_VERSION_MAJOR < 56) ++#endif ++ + #endif + + +@@ -314,7 +318,7 @@ static Bool FFD_CanHandleURL(GF_InputSer + } + + exit: +-#ifndef FF_API_CLOSE_INPUT_FILE ++#if FF_API_CLOSE_INPUT_FILE + if (ctx) av_close_input_file(ctx); + #else + if (ctx) avformat_close_input(&ctx); +@@ -685,7 +689,7 @@ static GF_Err FFD_ConnectService(GF_Inpu + + 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 FF_API_CLOSE_INPUT_FILE + av_close_input_file(ffd->ctx); + #else + avformat_close_input(&ffd->ctx); +@@ -704,7 +708,7 @@ static GF_Err FFD_ConnectService(GF_Inpu + + 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 FF_API_CLOSE_INPUT_FILE + if (ffd->ctx) av_close_input_file(ffd->ctx); + #else + if (ffd->ctx) avformat_close_input(&ffd->ctx); +@@ -762,7 +766,7 @@ static GF_Err FFD_CloseService(GF_InputS + + ffd->is_running = 0; + +-#ifndef FF_API_CLOSE_INPUT_FILE ++#if FF_API_CLOSE_INPUT_FILE + if (ffd->ctx) av_close_input_file(ffd->ctx); + #else + if (ffd->ctx) avformat_close_input(&ffd->ctx); diff --git a/debian/patches/series b/debian/patches/series index 49b48c8..b61302c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ mp4box-manpage-fix.patch gcc-optflags.patch libav10.patch export_gf_isom_set_pixel_aspect_ratio.patch +FF_API_CLOSE_INPUT_FILE.patch