From 210f1c44c7f2bdb07e2586f5ed4c314a4ca7786b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 20 Dec 2010 10:49:56 +0100 Subject: [PATCH] rtpbin: copy buffering stats when we create an aggregate buffering message, copy the buffering stats form the last message. At least we get correct buffering mode then. --- gst/rtpmanager/gstrtpbin.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 560bf5f..48e533f 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -1927,8 +1927,13 @@ gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message) GstRtpBinStream *stream; gboolean change = FALSE, active = FALSE; GstClockTime min_out_time; + GstBufferingMode mode; + gint avg_in, avg_out; + gint64 buffering_left; gst_message_parse_buffering (message, &percent); + gst_message_parse_buffering_stats (message, &mode, &avg_in, &avg_out, + &buffering_left); stream = g_object_get_data (G_OBJECT (GST_MESSAGE_SRC (message)), @@ -1990,6 +1995,8 @@ gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message) /* make a new buffering message with the min value */ message = gst_message_new_buffering (GST_OBJECT_CAST (bin), min_percent); + gst_message_set_buffering_stats (message, mode, avg_in, avg_out, + buffering_left); if (G_UNLIKELY (change)) { GstClock *clock; -- 2.7.4