gsth265parser does it already. Although corresponding API of h265parser is gst_h265_sei_free, _clear suffix is more consistent naming for h264parser since there are gst_h264_{sps,pps}_clear().
gsth265parser does it already. Although corresponding API of h265parser is gst_h265_sei_free, _clear suffix is more consistent naming for h264parser since there are gst_h264_{sps,pps}_clear().