nsf: Don't use GST_FLOW_IS_FATAL()

This commit is contained in:
Sebastian Dröge 2010-08-27 18:49:12 +02:00
parent dd8ae4e027
commit d95bb66074
2 changed files with 9 additions and 11 deletions

View file

@ -341,16 +341,14 @@ pause:
GST_DEBUG_OBJECT (nsfdec, "pausing task, reason %s", reason);
gst_pad_pause_task (pad);
if (GST_FLOW_IS_FATAL (ret) || ret == GST_FLOW_NOT_LINKED) {
if (ret == GST_FLOW_UNEXPECTED) {
/* perform EOS logic, FIXME, segment seek? */
gst_pad_push_event (pad, gst_event_new_eos ());
} else {
/* for fatal errors we post an error message */
GST_ELEMENT_ERROR (nsfdec, STREAM, FAILED,
(NULL), ("streaming task paused, reason %s", reason));
gst_pad_push_event (pad, gst_event_new_eos ());
}
if (ret == GST_FLOW_UNEXPECTED) {
/* perform EOS logic, FIXME, segment seek? */
gst_pad_push_event (pad, gst_event_new_eos ());
} else if (ret == GST_FLOW_NOT_LINKED || ret < GST_FLOW_UNEXPECTED) {
/* for fatal errors we post an error message */
GST_ELEMENT_ERROR (nsfdec, STREAM, FAILED,
(NULL), ("streaming task paused, reason %s", reason));
gst_pad_push_event (pad, gst_event_new_eos ());
}
goto done;
}

View file

@ -164,7 +164,7 @@ apu_setchan (int chan, boolean enabled)
}
old = (apu->mix_enable >> chan) & 1;
if (enabled != (boolean) - 1) {
apu->mix_enable = (apu->mix_enable & ~(1 << chan)) | ((!!enabled) << chan);
apu->mix_enable = (apu->mix_enable & ~(1 << chan)) | ((! !enabled) << chan);
}
return old;
}