mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-15 22:11:01 +00:00
gstreamer: Handle NULL
caps when parsing the allocation query
With the next release this will be handled explicitly and setting no caps will also be possible when creating allocation queries. See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1194 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1195>
This commit is contained in:
parent
24f8b74f21
commit
ee2505388b
1 changed files with 10 additions and 1 deletions
|
@ -1019,7 +1019,16 @@ impl Allocation {
|
|||
|
||||
ffi::gst_query_parse_allocation(self.as_mut_ptr(), &mut caps, need_pool.as_mut_ptr());
|
||||
(
|
||||
crate::CapsRef::from_ptr(caps),
|
||||
if caps.is_null() {
|
||||
#[link(name = "gstreamer-1.0")]
|
||||
extern "C" {
|
||||
pub static _gst_caps_any: *mut ffi::GstCaps;
|
||||
}
|
||||
|
||||
crate::CapsRef::from_ptr(_gst_caps_any)
|
||||
} else {
|
||||
crate::CapsRef::from_ptr(caps)
|
||||
},
|
||||
from_glib(need_pool.assume_init()),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue