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

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


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

    CC       libgstvaapi_la-gstvaapiencoder.lo
  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?


More information about the gstreamer-devel mailing list