autovideoconvert: check if there is already pads before creating and inserting it
-
In some cases, autovideoconvert will print the below critical log and caught SIGSEGV.
(gst-launch-1.0:7986): GStreamer-CRITICAL **: 06:44:35.318: gst_pad_set_chain_function_full: assertion 'GST_IS_PAD (pad)' failed
-
This issue is caused in
gst_base_auto_convert_add_element
function which may create internal pad repeatedly for the same element. If there is already internal pad in the table, the new created internal pad will be freed after callingg_hash_table_insert
and then causes the issue. -
Check if there is already internal pad of the selected element in the table before creating and inserting such pad.