Opened 5 years ago

Closed 5 years ago

#1128 closed defect (fixed)

build failure on debian squeeze (double typedef)

Reported by: sobukus Owned by: michael
Priority: normal Component: swresample
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

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 ‘SwrContext?
libswresample/swresample.h:47: note: previous declaration of ‘SwrContext?’ was here

I fixed it that way:

diff --git a/libswresample/swresample_internal.h b/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 offset
void *log_ctx; /< parent logging context

@@ -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 */

-}SwrContext?;
+};

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 typedef;-)

Change History (3)

comment:1 Changed 5 years ago by cehoyos

Please add the first line of "git log".
(Compilation works fine here with an old version of gcc since yesterday night.)

comment:2 Changed 5 years ago by sobukus

I see now that that exact change has been pushed with commit ac6798dbc118a8d63a6e57f8a0120666a2449efa. Well, there is a certain window between pulling the tree and the build advancing up to the breakage with old gear.

The issue can be closed,

comment:3 Changed 5 years ago by cehoyos

  • Reproduced by developer set
  • Resolution set to fixed
  • Status changed from new to closed
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.