Incorrect Initialization

I

Ian Munro

Trying to compile gst-ffmpeg-0.10.2 with native compiler on HP-UX 11i
v1 I get the following error message:

cc: "mpegvideo.c", line 6727: error 1521: Incorrect initialization.

Same code compiles OK with gcc.

The offending code is below, .pix_fmts= etc

Any ideas on how to resolve?

Tx

AVCodec h263_encoder = {
"h263",
CODEC_TYPE_VIDEO,
CODEC_ID_H263,
sizeof(MpegEncContext),
MPV_encode_init,
MPV_encode_picture,
MPV_encode_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
};
 
S

santosh

Ian said:
Trying to compile gst-ffmpeg-0.10.2 with native compiler on HP-UX 11i
v1 I get the following error message:

cc: "mpegvideo.c", line 6727: error 1521: Incorrect initialization.

Same code compiles OK with gcc.

<snip>

You might get much better response when you post to one the GStreamer
mailing-lists, particularly gstreamer-devel, mentioned at the link
below.

<http://gstreamer.freedesktop.org/lists/>

Also note that the package has more updated versions than yours. If
possible you might use one of those.
 
M

Martin Wells

Ian:
AVCodec h263_encoder = {
"h263",
CODEC_TYPE_VIDEO,
CODEC_ID_H263,
sizeof(MpegEncContext),
MPV_encode_init,
MPV_encode_picture,
MPV_encode_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, -1},
};


Compound literals are a C99 feature, as is using ".membername = " in
an initialiser. Try replace the exact above piece of code with:

AVCodec h263_encoder = {
"h263",
CODEC_TYPE_VIDEO,
CODEC_ID_H263,
sizeof(MpegEncContext),
MPV_encode_init,
MPV_encode_picture,
MPV_encode_end
};

enum PixelFormat const pf[2] = {PIX_FMT_YUV420P, -1};

h263_encoder.pix_fmts = pf;

Martin
 
M

Martin Wells

enum PixelFormat const pf[2] = {PIX_FMT_YUV420P, -1};


I don't know if C99 compound literals are:
1) L-value or R-value
2) Const or modifiable

, so maybe you need to take the const out:

enum PixelFormat pf[] = {PIX_FMT_YUV420P, -1};

(The 2 is unnecessary)

Martin
 
I

Ian Munro

enum PixelFormat const pf[2] = {PIX_FMT_YUV420P, -1};


I don't know if C99 compound literals are:
1) L-value or R-value
2) Const or modifiable

, so maybe you need to take the const out:

enum PixelFormat pf[] = {PIX_FMT_YUV420P, -1};

(The 2 is unnecessary)

Martin

Thanks for the suggestion. I took the hint and gave the -AC99 option
to the compiler which has opened up a whole new can of worms, which I
am working my way through!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top