[FFmpeg-trac] #1128(swresample:new): build failure on debian squeeze (double typedef)

FFmpeg trac at avcodec.org
Sun Mar 25 11:48:47 CEST 2012

#1128: build failure on debian squeeze (double typedef)
               Reporter:  sobukus    |                  Owner:  michael
                   Type:  defect     |                 Status:  new
               Priority:  normal     |              Component:  swresample
                Version:             |               Keywords:
  unspecified                        |               Blocking:
             Blocked By:             |  Analyzed by developer:  0
Reproduced by developer:  0          |
 With current ffmpeg git, the gcc of stable debian (4.4.5) is irritated by
 the touble occurence of typedef SwrContex:

 In file included from libswresample/audioconvert.h:32,
                  from libswresample/audioconvert.c:32:
 libswresample/swresample_internal.h:78: error: redefinition of typedef
 libswresample/swresample.h:47: note: previous declaration of ‘SwrContext’
 was here

 I fixed it that way:

 diff --git a/libswresample/swresample_internal.h
 index f53ccd7..e3c0b3d 100644
 --- a/libswresample/swresample_internal.h
 +++ b/libswresample/swresample_internal.h
 @@ -32,7 +32,7 @@ typedef struct AudioData{
      int planar;                 ///< 1 if planar audio, 0 otherwise
  } AudioData;

 -typedef struct SwrContext {
 +struct SwrContext {
      const AVClass *av_class;                        ///< AVClass used for
 AVOption and av_log()
      int log_level_offset;                           ///< logging level
      void *log_ctx;                                  ///< parent logging
 @@ -75,7 +75,7 @@ typedef struct SwrContext {
      uint8_t matrix_ch[SWR_CH_MAX][SWR_CH_MAX+1];    ///< Lists of input
 channels per output channel th

      /* TODO: callbacks for ASM optimizations */

  struct ResampleContext *swri_resample_init(struct ResampleContext *, int
 out_rate, int in_rate, int fi
  void swri_resample_free(struct ResampleContext **c);

 I am sure you come up with whatever way you prefer to avoid doubling that

Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1128>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list