diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2002-11-03 03:58:30 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2002-11-03 03:58:30 +0000 |
commit | 0cf5963cff8999687ef76bc6a4839ff51d7cf842 (patch) | |
tree | cd24eaebcfc3ae5a56086dededaff701901a2938 /gst/wavparse | |
parent | 9c0710183141a91a61107fc545662d0a5c3fd7c2 (diff) |
don't push if can't push
Original commit message from CVS:
don't push if can't push
Diffstat (limited to 'gst/wavparse')
-rw-r--r-- | gst/wavparse/gstwavparse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 14130729..dd6c8025 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -197,7 +197,8 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf) GST_BUFFER_TIMESTAMP (buf) = wavparse->offset * GST_SECOND / wavparse->rate; wavparse->offset += GST_BUFFER_SIZE (buf) * 8 / wavparse->width / wavparse->channels; - gst_pad_push (wavparse->srcpad, buf); + if (GST_PAD_IS_USABLE (wavparse->srcpad)) + gst_pad_push (wavparse->srcpad, buf); return; } @@ -335,7 +336,8 @@ gst_wavparse_chain (GstPad *pad, GstBuffer *buf) gst_buffer_unref (buf); - gst_pad_push (wavparse->srcpad, newbuf); + if (GST_PAD_IS_USABLE (wavparse->srcpad)) + gst_pad_push (wavparse->srcpad, newbuf); /* now we're ready to go, the next buffer should start data */ wavparse->state = GST_WAVPARSE_DATA; |