diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2004-05-06 09:14:29 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2004-05-06 09:14:29 +0000 |
commit | d2b5ac130bdd5b8a03da61c0b78ee0065d103ff7 (patch) | |
tree | f088db50dccec54ad6f57870de5b56bc8c27cc73 /gst/wavenc/gstwavenc.c | |
parent | 2faacf74c8b77af6a11977c04fd9508eb6ce1462 (diff) |
gst/wavenc/gstwavenc.c: First process the events before deciding that negotiation was not performed.
Original commit message from CVS:
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain):
First process the events before deciding that negotiation
was not performed.
Diffstat (limited to 'gst/wavenc/gstwavenc.c')
-rw-r--r-- | gst/wavenc/gstwavenc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index ea9324a8..99e34ce1 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -605,13 +605,6 @@ gst_wavenc_chain (GstPad * pad, GstData * _data) wavenc = GST_WAVENC (gst_pad_get_parent (pad)); - if (!wavenc->setup) { - gst_buffer_unref (buf); - GST_ELEMENT_ERROR (wavenc, CORE, NEGOTIATION, (NULL), - ("encoder not initialised (input is not audio?)")); - return; - } - if (GST_IS_EVENT (buf)) { if (GST_EVENT_TYPE (buf) == GST_EVENT_EOS) { wavenc->pad_eos = TRUE; @@ -634,6 +627,13 @@ gst_wavenc_chain (GstPad * pad, GstData * _data) return; } + if (!wavenc->setup) { + gst_buffer_unref (buf); + GST_ELEMENT_ERROR (wavenc, CORE, NEGOTIATION, (NULL), + ("encoder not initialised (input is not audio?)")); + return; + } + if (GST_PAD_IS_USABLE (wavenc->srcpad)) { if (wavenc->flush_header) { GstBuffer *outbuf; |