may be used uninitialized in gstvaapiencoder.c:get_profile()

Wolfgang Grandegger wg at grandegger.com
Thu Mar 21 07:57:55 UTC 2019


Helllo,

I want to test GStreamer 1.15.2. When I compile "gstreamer-vaapi", I get
the following warning:

    CC       libgstvaapi_la-gstvaapiencoder.lo
    CCLD     libgstvaapi-egl.la
  gstvaapiencoder.c: In function 'get_profile':
  gstvaapiencoder.c:751:22: error: 'profile' may be used uninitialized in this function [-Werror=maybe-uninitialized]
       encoder->profile = get_compatible_profile (encoder);
       ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Is this a known issue? Looking to the function 'get_profile', it's not
obvious to me how to fix it:

  static GstVaapiProfile
  get_profile (GstVaapiEncoder * encoder)
  {
    if (!encoder->profile)
      encoder->profile = get_compatible_profile (encoder);
    return encoder->profile;
  }

Do I miss something?

Wolfgang.


More information about the gstreamer-devel mailing list