mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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
This commit is contained in:
parent
12a3bdbd09
commit
dd5144fd4e
1 changed files with 4 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue