summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 27d8c58)
raw | patch | inline | side by side (parent: 27d8c58)
author | Wim Taymans <wim.taymans@gmail.com> | |
Tue, 12 Jun 2007 08:38:06 +0000 (08:38 +0000) | ||
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | |
Thu, 29 Oct 2009 10:17:13 +0000 (11:17 +0100) |
Original commit message from CVS:
Patches by: Thiago Sousa Santos <thiagossantos at gmail dot com>
* gst/playback/gstqueue2.c: (update_buffering),
(gst_queue_locked_enqueue):
Fix a division by zero when the max percent is <= 0. Fixes #446572.
also update the buffering status when receiving events. Fixes #446551.
Patches by: Thiago Sousa Santos <thiagossantos at gmail dot com>
* gst/playback/gstqueue2.c: (update_buffering),
(gst_queue_locked_enqueue):
Fix a division by zero when the max percent is <= 0. Fixes #446572.
also update the buffering status when receiving events. Fixes #446551.
gst/playback/gstqueue2.c | patch | blob | history |
index bf52907f9ce2ef43da2919f5d67bd5ab184bbb42..d512d80fcff82c6db75a212072836ff7b7856041 100644 (file)
--- a/gst/playback/gstqueue2.c
+++ b/gst/playback/gstqueue2.c
gint percent;
gboolean post = FALSE;
- if (!queue->use_buffering)
+ if (!queue->use_buffering || queue->high_percent <= 0)
return;
#define GET_PERCENT(format) ((queue->max_level.format) > 0 ? \
apply_buffer (queue, buffer, &queue->sink_segment);
/* update the byterate stats */
update_rates (queue);
- /* update the buffering status */
- update_buffering (queue);
if (QUEUE_IS_USING_TEMP_FILE (queue)) {
gst_queue_write_buffer_to_file (queue, buffer);
item = NULL;
}
- if (!QUEUE_IS_USING_TEMP_FILE (queue) && item)
- g_queue_push_tail (queue->queue, item);
- GST_QUEUE_SIGNAL_ADD (queue);
+ if (item) {
+ /* update the buffering status */
+ update_buffering (queue);
+
+ if (!QUEUE_IS_USING_TEMP_FILE (queue))
+ g_queue_push_tail (queue->queue, item);
+ GST_QUEUE_SIGNAL_ADD (queue);
+ }
return;