After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336336 - [queue] Queue might block in EOS
[queue] Queue might block in EOS
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.4
Other Linux
: Normal normal
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-03-28 12:23 UTC by Tommi Myöhänen
Modified: 2006-03-29 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for queue EOS handling (2.65 KB, patch)
2006-03-28 12:30 UTC, Tommi Myöhänen
needs-work Details | Review
Patch for queue EOS handling (2.62 KB, patch)
2006-03-29 10:42 UTC, Tommi Myöhänen
committed Details | Review

Description Tommi Myöhänen 2006-03-28 12:23:54 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.
Comment 1 Tommi Myöhänen 2006-03-28 12:30:30 UTC
Created attachment 62198 [details] [review]
Patch for queue EOS handling

Attached is patch that handles EOS with minimum threshold values set.
Comment 2 Wim Taymans 2006-03-28 17:57:04 UTC
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.
Comment 3 Tommi Myöhänen 2006-03-29 10:42:41 UTC
Created attachment 62285 [details] [review]
Patch for queue EOS handling

Moved threshold reset to gst_queue_locked_flush().
Comment 4 Wim Taymans 2006-03-29 11:02:40 UTC
        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.