[FFmpeg-devel] [PATCH] Current SVN doesn't build with gcc 4.2.x

Bernhard Rosenkraenzer bero
Mon Jul 2 20:04:52 CEST 2007

Line 118 of ffmpeg.c

static AVRational frame_rate = (AVRational) {25,1};

causes gcc 4.2.x to barf:

ffmpeg.c:118: error: initializer element is not constant.

It does accept the line if the (better readable, but unnecessary) cast is 

static AVRational frame_rate = {25,1};

I'm not sure if this is a gcc bug or some weird but intended interpretation of 

Either way, patch attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-gcc-4.2.patch
Type: text/x-diff
Size: 461 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070702/6d505dae/attachment.patch>

More information about the ffmpeg-devel mailing list