Incorrect Initialization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian Munro

    #1

    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_VIDE O,
    CODEC_ID_H263,
    sizeof(MpegEncC ontext),
    MPV_encode_init ,
    MPV_encode_pict ure,
    MPV_encode_end,
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV42 0P, -1},
    };

  • santosh

    #2
    Re: Incorrect Initialization

    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.freed esktop.org/lists/>

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

    Comment

    • Martin Wells

      #3
      Re: Incorrect Initialization

      Ian:
      AVCodec h263_encoder = {
      "h263",
      CODEC_TYPE_VIDE O,
      CODEC_ID_H263,
      sizeof(MpegEncC ontext),
      MPV_encode_init ,
      MPV_encode_pict ure,
      MPV_encode_end,
      .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV42 0P, -1},
      };

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

      AVCodec h263_encoder = {
      "h263",
      CODEC_TYPE_VIDE O,
      CODEC_ID_H263,
      sizeof(MpegEncC ontext),
      MPV_encode_init ,
      MPV_encode_pict ure,
      MPV_encode_end
      };

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

      h263_encoder.pi x_fmts = pf;

      Martin

      Comment

      • Martin Wells

        #4
        Re: Incorrect Initialization

        enum PixelFormat const pf[2] = {PIX_FMT_YUV420 P, -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_YUV420 P, -1};

        (The 2 is unnecessary)

        Martin

        Comment

        • Ian Munro

          #5
          Re: Incorrect Initialization

          On Sat, 06 Oct 2007 09:31:54 -0700, Martin Wells <warint@eircom. net>
          wrote:
          >
          >enum PixelFormat const pf[2] = {PIX_FMT_YUV420 P, -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_YUV420 P, -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!

          Comment

          Working...