diff options
author | Leif Johnson <leif@ambient.2y.net> | 2003-07-19 23:17:57 +0000 |
---|---|---|
committer | Leif Johnson <leif@ambient.2y.net> | 2003-07-19 23:17:57 +0000 |
commit | d5c716edbd09cbb187ffec03b6855e59a6e96c11 (patch) | |
tree | 0bf2774d8b59ab114305d242a2f1e88cb26ab43b /gst/playondemand/filter.func | |
parent | 90ec1eb6528f2bb1abcdcb4d4837426d0c7d915a (diff) | |
download | gst-plugins-bad-d5c716edbd09cbb187ffec03b6855e59a6e96c11.tar.gz gst-plugins-bad-d5c716edbd09cbb187ffec03b6855e59a6e96c11.tar.bz2 gst-plugins-bad-d5c716edbd09cbb187ffec03b6855e59a6e96c11.zip |
+ attempting to fix up playondemand ... still makes nasty crackly noises
Original commit message from CVS:
+ attempting to fix up playondemand ... still makes nasty crackly noises
Diffstat (limited to 'gst/playondemand/filter.func')
-rw-r--r-- | gst/playondemand/filter.func | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gst/playondemand/filter.func b/gst/playondemand/filter.func index 61c1cc56..7c9f4de7 100644 --- a/gst/playondemand/filter.func +++ b/gst/playondemand/filter.func @@ -6,22 +6,23 @@ filter_data = (_TYPE_ *) filter->buffer; num_filter = filter->buffer_bytes / sizeof(_TYPE_); do { + if (in == NULL && ! filter->eos) in = gst_pad_pull(filter->sinkpad); + /****************************************************************************/ /* see if we've got any events coming through ... */ while (! filter->eos && GST_IS_EVENT(in)) { if (GST_EVENT_TYPE(in) == GST_EVENT_EOS) { gst_event_unref(in); + gst_buffer_free(in); filter->eos = TRUE; } else if ((GST_EVENT_TYPE(in) == GST_EVENT_SEEK) || (GST_EVENT_TYPE(in) == GST_EVENT_FLUSH)) { + gst_event_unref(in); + gst_buffer_free(in); filter->eos = FALSE; filter->write = 0; } else { - if ((GST_EVENT_TYPE(in) == GST_EVENT_SEEK) || - (GST_EVENT_TYPE(in) == GST_EVENT_FLUSH)) - filter->write = 0; - gst_pad_push(filter->srcpad, in); } @@ -49,6 +50,8 @@ do { out = gst_buffer_new_from_pool(filter->bufpool, 0, 0); } + in = NULL; + /****************************************************************************/ /* check to see if we have to add new play pointers. */ @@ -113,8 +116,6 @@ do { gst_pad_push(filter->srcpad, out); - in = (! filter->eos) ? gst_pad_pull(filter->sinkpad) : NULL; - if (gst_element_interrupt (GST_ELEMENT (filter))) break; } while (TRUE); |