diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-07-10 12:10:45 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-07-10 14:37:31 +0200 |
commit | dd5144fd4ef5cfb1ee45d4009ea2bc4775395874 (patch) | |
tree | 369b385916aa18d1d62b2832c64cb06a1c608506 /gst | |
parent | 12a3bdbd09abd8535d50a7c6c049e076b0e99be3 (diff) |
wavenc: Return not-negotiated if we got no caps or caps negotiation failed
And do it always, not inside a g_return_val_if_fail().
See https://bugzilla.gnome.org/show_bug.cgi?id=732939
Diffstat (limited to 'gst')
-rw-r--r-- | gst/wavenc/gstwavenc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index fa82cf969..9f62fc7ac 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -848,7 +848,10 @@ gst_wavenc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) GstWavEnc *wavenc = GST_WAVENC (parent); GstFlowReturn flow = GST_FLOW_OK; - g_return_val_if_fail (wavenc->channels > 0, GST_FLOW_FLUSHING); + if (wavenc->channels <= 0) { + GST_ERROR_OBJECT (wavenc, "Got data without caps"); + return GST_FLOW_NOT_NEGOTIATED; + } if (G_UNLIKELY (!wavenc->sent_header)) { /* starting a file, means we have to finish it properly */ |