GNOME Bugzilla – Bug 786670
vpxenc: Return empty GValueArray instead of NULL in gst_vpx_enc_get_property
Last modified: 2017-08-26 16:52:50 UTC
We should return an empty GValueArray instead of NULL in gst_vpx_enc_get_property. Otherwise, we will get a SEGFAULT when calling gst_preset_save_preset() on the encoder. This happens because the gst_value_serialize_g_value_array() function expects a valid GValueArray and not NULL.
Created attachment 358210 [details] [review] Return empty GValueArray instead of NULL.
Or maybe we should fix gst_preset_save_preset() instead? Andin your patch it would be better to use _take_boxed() instead of _set_boxed()+_free() :)
> Or maybe we should fix gst_preset_save_preset() instead? Well, first GstValue::serialize should not crash, then fact that it does makes me think vpxenc should not passe NULL as a GValueArray pointer. We want gst_preset_save_preset to have a serialized empty array, not a reference to a NULL pointer I think.
Created attachment 358298 [details] [review] Return empty GValueArray instead of NULL. I uploaded a new patch with _take_boxed() instead of _set_boxed()+_free(). I also think it would be better to fix it here rather than in GstPreset.
commit 6a0b0b653e6d99a35fd7463a35fd2e928f4b3abd (HEAD -> 1.12) Author: Thibault Saunier <thibault.saunier@osg.samsung.com> Date: Sat Aug 26 13:44:38 2017 -0300 value: Handle serializing NULL GValueArray Consider them as an empty array and do not segfault... https://bugzilla.gnome.org/show_bug.cgi?id=786670