GNOME Bugzilla – Bug 336336
[queue] Queue might block in EOS
Last modified: 2006-03-29 11:02:40 UTC
In queue, when EOS is received, if minimum threshold > max_size - current_level, there is chance that queue blocks forever in conditional item del wait. This is because the queue is not emptied completely due to minimum threshold. Here is another approach. Instead of setting cur_levels to max in EOS, just zero all minimum threshold levels. This should make sure that queue gives out all data. When going to READY (stop) state, just reset the original minimum threshold levels.
Created attachment 62198 [details] [review] Patch for queue EOS handling Attached is patch that handles EOS with minimum threshold values set.
looks very good, should also reset to the defaults if the queue is flushed, since that might flush the EOS event from the queue. Putting the restore code in gst_queue_locked_flush() might do the trick for flushing and shutdown.
Created attachment 62285 [details] [review] Patch for queue EOS handling Moved threshold reset to gst_queue_locked_flush().
Patch by Tommi My��h��nen <ext-tommi dot myohanen at nokia dot com> * plugins/elements/gstqueue.c: (gst_queue_init), (gst_queue_locked_flush), (gst_queue_handle_sink_event), (gst_queue_set_property): * plugins/elements/gstqueue.h: In queue, when EOS is received, if minimum threshold > max_size - current_level, there is chance that queue blocks forever in conditional item del wait. This is because the queue is not emptied completely due to minimum threshold. Here is another approach. Instead of setting cur_levels to max in EOS, just zero all minimum threshold levels. This should make sure that queue gives out all data. When going to READY (stop) state, just reset the original minimum threshold levels. Fixes #336336.