[MPlayer-dev-eng] [PATCH v2] Support newer GIFLIB versions

Diego Biurrun diego at biurrun.de
Thu Jul 25 11:10:21 CEST 2013


On Thu, Jul 25, 2013 at 01:05:15AM +0200, Alexander Strasser wrote:
> Work with GIFLIB version >= 4.2

When was giflib 5 released?

> --- a/libmpdemux/demux_gif.c
> +++ b/libmpdemux/demux_gif.c
> @@ -45,6 +45,32 @@ typedef struct {
>  
>  #define GIF_SIGNATURE (('G' << 16) | ('I' << 8) | 'F')
>  
> +#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5

The defined check is kind of redundant.  If GIFLIB_MAJOR is not defined,
its value is equal to '0'.  So this could be simplified, but at the cost
of a warning for cases when GIFLIB_MAJOR is undefined.

> +#define DGifOpen(a, b) DGifOpen(a, b, NULL)
> +#define DGifOpenFileHandle(a) DGifOpenFileHandle(a, NULL)
> +#define GifError() (gif ? gif->Error : 0)
> +#define GifErrorString() GifErrorString(gif->Error)
> +#endif
> +
> +/* >= 4.2 prior GIFLIB did not have MAJOR/MINOR defines */
> +#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 4

#elif

> +static void print_gif_error(GifFileType * gif)

*gif

Diego


More information about the MPlayer-dev-eng mailing list