mssdemux: Properly compute new bitrate and use bitrate_limit.
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>
Tue, 5 Feb 2013 06:01:04 +0000 (04:01 -0200)
committerThiago Santos <thiago.sousa.santos@collabora.com>
Wed, 8 May 2013 00:09:48 +0000 (21:09 -0300)
ext/smoothstreaming/gstmssdemux.c

index a87418e4606436b85ae263bf01e18dd2df9fb64c..0246226451c94cfb5ac2846080ae92d121a84c3b 100644 (file)
@@ -954,7 +954,8 @@ gst_mss_demux_reconfigure (GstMssDemux * mssdemux)
   if (!gst_mss_demux_all_streams_have_data (mssdemux))
     return;
 
-  new_bitrate = 0.8 * gst_mss_demux_get_download_bitrate (mssdemux) / 1000;
+  new_bitrate =
+      mssdemux->bitrate_limit * gst_mss_demux_get_download_bitrate (mssdemux);
   if (mssdemux->connection_speed) {
     new_bitrate = MIN (mssdemux->connection_speed, new_bitrate);
   }