From d95bb66074bf44340b0bc1aba5cb034fbd06fd42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 27 Aug 2010 18:49:12 +0200 Subject: [PATCH] nsf: Don't use GST_FLOW_IS_FATAL() --- gst/nsf/gstnsf.c | 18 ++++++++---------- gst/nsf/nes_apu.c | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/gst/nsf/gstnsf.c b/gst/nsf/gstnsf.c index 11e2a86ab0..a57b9925a4 100644 --- a/gst/nsf/gstnsf.c +++ b/gst/nsf/gstnsf.c @@ -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; } diff --git a/gst/nsf/nes_apu.c b/gst/nsf/nes_apu.c index b3a9b42af7..bc086d547f 100644 --- a/gst/nsf/nes_apu.c +++ b/gst/nsf/nes_apu.c @@ -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; }