[FFmpeg-devel] [PATCH] Escape 124 (RPL) decoder rev5
Reimar Döffinger
Reimar.Doeffinger
Mon Mar 31 18:44:12 CEST 2008
On Mon, Mar 31, 2008 at 04:37:33PM +0100, M?ns Rullg?rd wrote:
> Mike Melanson wrote:
> > M?ns Rullg?rd wrote:
> >> Mike Melanson wrote:
> >>> Robert Swain wrote:
> >>>> On 30/03/2008, Michael Niedermayer <michaelni at gmx.at> wrote:
> >>>>> On Sat, Mar 29, 2008 at 08:38:02PM -0700, Eli Friedman wrote:
> >>>>> > Per subject, fifth revision of Escape 124 decoder.
> >>>>>
> >>>>> looks ok
> >>>> Applied.
> >>> This breaks compilation under gcc 2.95.3. The offending line is the
> >>> blocks member of the CodeBook structure:
> >>>
> >>> typedef struct CodeBook {
> >>> unsigned depth;
> >>> unsigned size;
> >>> MacroBlock blocks[];
> >>> } CodeBook;
> >>>
> >>> The error is: "field `blocks' has incomplete type".
> >>
> >> For the record, this is valid C99, but not C90.
> >
> > Acknowledged. But how will we go about changing the code so that it will
> > compile on gcc 2.95.3/x86_32, which is still classified as a supported
> > configuration?
>
> Declare the array as size 1, and adjust the malloc() call accordingly.
Actually, for gcc and (IIRC) icc, declaring it as an array of size 0
works too. It does not work for Sun CC, so I guess it is not legal C...
Greetings,
Reimar D?ffinger
More information about the ffmpeg-devel
mailing list