473,385 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Incorrect Initialization

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},
};

Oct 6 '07 #1
4 1795
Ian Munro wrote:
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.

Oct 6 '07 #2
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

Oct 6 '07 #3
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

Oct 6 '07 #4
On Sat, 06 Oct 2007 09:31:54 -0700, Martin Wells <wa****@eircom.net>
wrote:
>
>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!
Oct 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Qin Chen | last post by:
I will present very long code, hope someone will read it all, and teach me something like tom_usenet. This question comes to me when i read <<Think in C++>> 2nd, chapter 10 , name control,...
10
by: JKop | last post by:
What's the difference between them? Take the following: #include <iostream> struct Blah { int k;
13
by: NM | last post by:
Sometimes ago I was having a problem in linking between C++ and Fortran program. That was solved (using input from this newsgroup) using the Fortran keyword "sequence" with the derived types (to...
4
by: Larry Woods | last post by:
I have a Messagebox that looks like: MessageBox.Show("There are pending changes for this patient. Do you want to continue to close?", "Pending Changes", MessageBoxButtons.YesNo,...
8
by: lovecreatesbea... | last post by:
K&R 2, sec 2.4 says: If the variable in question is not automatic, the initialization is done once only, conceptually before the program starts executing, ... . "Non-automatic variables are...
23
by: Jess | last post by:
Hello, I understand the default-initialization happens if we don't initialize an object explicitly. I think for an object of a class type, the value is determined by the constructor, and for...
4
by: Jess | last post by:
Hello, I tried several books to find out the details of object initialization. Unfortunately, I'm still confused by two specific concepts, namely default-initialization and...
20
by: JohnQ | last post by:
The way I understand the startup of a C++ program is: A.) The stuff that happens before the entry point. B.) The stuff that happens between the entry point and the calling of main(). C.)...
11
by: subramanian100in | last post by:
Suppose we have a class named Test. Test obj; // assuming default ctor is available Test direct_init(obj); // direct initialization happens here Test copy_init = obj; // copy initialization...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.