[MPlayer-dev-eng] [PATCH] AVCodecTag redefined when using external libavformat

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Jan 24 23:18:00 CET 2007


Hello,
On Wed, Jan 24, 2007 at 11:06:51PM +0100, Nico Sabbi wrote:
> following a simplified version of one of Michael's advices in ffmpeg-devel
> this patch redefines the structure AVCodecTag (defined in riff.h but not 
> installed)
> when  using LIBAVFORMAT_SO (and finally restoring compilation).
> Michael, if you don't object I'll commit soon

> Index: demux_lavf.c
> ===================================================================
> --- demux_lavf.c	(revisione 22001)
> +++ demux_lavf.c	(copia locale)
> @@ -38,7 +38,6 @@
>  #include "avi.h"
>  #include "opt.h"
>  #endif
> -#include "riff.h"
>  
>  #define PROBE_BUF_SIZE 2048
>  
> @@ -50,7 +49,16 @@
>  	{NULL, NULL, 0, 0, 0, 0, NULL}
>  };
>  
> +#ifdef USE_LIBAVFORMAT_SO
> +typedef struct {
> +    int id;
> +    unsigned int tag;
> +} AVCodecTag;
>  
> +extern const AVCodecTag codec_bmp_tags[];
> +extern const AVCodecTag codec_wav_tags[];
> +#endif
> +

And how is this supposed to work when USE_LIBAVFORMAT_SO is not defined?
I still dislike duplicating code for (IMO) no good reason though, also if
AVCodecTag ever changes the compiler has no chance of noticing and
complaining.
And lastly, I'd prefer to have this in the place where the original
riff.h was.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list