[gst-devel] Re: [gst-cvs] wtay gstreamer: gstreamer/ gstreamer/gst/ gstreamer/gst/base/

Ronald S. Bultje rbultje at ronald.bitfreak.net
Fri Oct 28 09:20:41 CEST 2005


Hi,

On Fri, 2005-10-28 at 03:45 -0700, Wim Taymans wrote:
> +    /* FIXME, abusing the cur_level */
> +    queue->cur_level.buffers = queue->max_size.buffers;
> +    queue->cur_level.bytes = queue->max_size.bytes;
> +    queue->cur_level.time = queue->max_size.time;
> +  }
[..]
>      if (GST_EVENT_TYPE (data) == GST_EVENT_EOS) {
> +      queue->cur_level.buffers = 0;
> +      queue->cur_level.bytes = 0;
> +      queue->cur_level.time = 0;

This will break when we reuse queues for chained oggs, for example.
There's probably more cases. It may be better to add a
queue->cur_level.num_eos, initialize to 0 and count the number of eoses
currently in there, so ++ in the chainfunc and -- in the taskfunc. If
it's larger than 0, then never block in the taskfunc of the queue, or so
(so instead of if (cur_level >= max_size) { .. }, you do if (cur_level
>= max_size || num_eos > 0) { .. }.

Cheers,
Ronald





More information about the gstreamer-devel mailing list