video: Assert if caption data passed when adding caption metas is empty

It will cause a critical warning otherwise.
This commit is contained in:
Sebastian Dröge 2020-04-22 21:42:39 +03:00
parent 86e6d3afa4
commit 47cc80b1ef

View file

@ -210,6 +210,7 @@ impl VideoCaptionMeta {
data: &[u8],
) -> gst::MetaRefMut<'a, Self, gst::meta::Standalone> {
skip_assert_initialized!();
assert!(!data.is_empty());
unsafe {
let meta = gst_video_sys::gst_buffer_add_video_caption_meta(
buffer.as_mut_ptr(),