mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-04-30 05:25:07 +00:00
Ignore stop failures
stop should only really fail if everything is broken, but we can always recover somehow here.
This commit is contained in:
parent
961d6ce115
commit
bccf3805a1
5 changed files with 11 additions and 5 deletions
|
@ -370,7 +370,7 @@ pub unsafe extern "C" fn demuxer_start(ptr: *const DemuxerWrapper,
|
|||
pub unsafe extern "C" fn demuxer_stop(ptr: *const DemuxerWrapper) -> GBoolean {
|
||||
let wrap: &DemuxerWrapper = &*ptr;
|
||||
|
||||
panic_to_error!(wrap, GBoolean::False, {
|
||||
panic_to_error!(wrap, GBoolean::True, {
|
||||
GBoolean::from_bool(wrap.stop())
|
||||
})
|
||||
}
|
||||
|
|
|
@ -194,7 +194,10 @@ gst_rs_sink_stop (GstBaseSink * basesink)
|
|||
{
|
||||
GstRsSink *sink = GST_RS_SINK (basesink);
|
||||
|
||||
return sink_stop (sink->instance);
|
||||
/* Ignore stop failures */
|
||||
sink_stop (sink->instance);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GstURIType
|
||||
|
|
|
@ -236,7 +236,7 @@ pub unsafe extern "C" fn sink_start(ptr: *const SinkWrapper) -> GBoolean {
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sink_stop(ptr: *const SinkWrapper) -> GBoolean {
|
||||
let wrap: &SinkWrapper = &*ptr;
|
||||
panic_to_error!(wrap, GBoolean::False, {
|
||||
panic_to_error!(wrap, GBoolean::True, {
|
||||
GBoolean::from_bool(wrap.stop())
|
||||
})
|
||||
}
|
||||
|
|
|
@ -218,7 +218,10 @@ gst_rs_src_stop (GstBaseSrc * basesrc)
|
|||
{
|
||||
GstRsSrc *src = GST_RS_SRC (basesrc);
|
||||
|
||||
return source_stop (src->instance);
|
||||
/* Ignore stop failures */
|
||||
source_stop (src->instance);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -278,7 +278,7 @@ pub unsafe extern "C" fn source_start(ptr: *const SourceWrapper) -> GBoolean {
|
|||
pub unsafe extern "C" fn source_stop(ptr: *const SourceWrapper) -> GBoolean {
|
||||
let wrap: &SourceWrapper = &*ptr;
|
||||
|
||||
panic_to_error!(wrap, GBoolean::False, {
|
||||
panic_to_error!(wrap, GBoolean::True, {
|
||||
GBoolean::from_bool(wrap.stop())
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue