forked from mirrors/gstreamer-rs
video: Assert if caption data passed when adding caption metas is empty
It will cause a critical warning otherwise.
This commit is contained in:
parent
605898277f
commit
215dbe53c6
1 changed files with 1 additions and 0 deletions
|
@ -204,6 +204,7 @@ impl VideoCaptionMeta {
|
|||
caption_type: ::VideoCaptionType,
|
||||
data: &[u8],
|
||||
) -> gst::MetaRefMut<'a, Self, gst::meta::Standalone> {
|
||||
assert!(!data.is_empty());
|
||||
unsafe {
|
||||
let meta = gst_video_sys::gst_buffer_add_video_caption_meta(
|
||||
buffer.as_mut_ptr(),
|
||||
|
|
Loading…
Reference in a new issue