Ignore stop failures

stop should only really fail if everything is broken, but we can always
recover somehow here.
This commit is contained in:
Sebastian Dröge 2016-12-25 12:20:44 +01:00
parent 961d6ce115
commit bccf3805a1
5 changed files with 11 additions and 5 deletions

View file

@ -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())
})
}

View file

@ -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

View file

@ -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())
})
}

View file

@ -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

View file

@ -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())
})
}