gstvaapicontext: fix the JPEG encoder attribs value
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 23 Jun 2015 15:49:51 +0000 (17:49 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 4 Aug 2015 17:42:48 +0000 (19:42 +0200)
When we query for the VAConfigAttribEncJPEG, we get a value which packs the
VAConfigAttribValEncJPEG structure, but we did not assign it. This patch
assigns the returned value to the attribute.

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=744042

gst-libs/gst/vaapi/gstvaapicontext.c

index ffa7458..113c960 100644 (file)
@@ -248,18 +248,10 @@ context_create (GstVaapiContext * context)
       }
 #if VA_CHECK_VERSION(0,37,0)
       if (cip->profile == GST_VAAPI_PROFILE_JPEG_BASELINE) {
-        VAConfigAttribValEncJPEG jpeg_attrib_val;
-        /* JPEG Encoding Attribute */
         attrib->type = VAConfigAttribEncJPEG;
         if (!context_get_attribute (context, attrib->type, &value))
           goto cleanup;
-        jpeg_attrib_val.value = attrib->value;
-        /* Set JPEG profile attribs */
-        jpeg_attrib_val.bits.arithmatic_coding_mode = 0;
-        jpeg_attrib_val.bits.progressive_dct_mode = 0;
-        jpeg_attrib_val.bits.non_interleaved_mode = 1;
-        jpeg_attrib_val.bits.differential_mode = 0;
-        attrib->value = jpeg_attrib_val.value;
+        attrib->value = value;
         attrib++;
       }
 #endif