[grilo-plugins] dleyna: convert bits/s to kbits/s.



commit 1d93ae1199d445de07dd6720ec94e973c1695f66
Author: Ben Walsh <b wumpster com>
Date:   Thu Jan 19 20:44:13 2017 +0000

    dleyna: convert bits/s to kbits/s.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777210

 src/dleyna/grl-dleyna-source.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/dleyna/grl-dleyna-source.c b/src/dleyna/grl-dleyna-source.c
index acb51cd..6d6ec6c 100644
--- a/src/dleyna/grl-dleyna-source.c
+++ b/src/dleyna/grl-dleyna-source.c
@@ -551,7 +551,11 @@ media_set_property (GrlMedia *media,
   else if (g_strcmp0 (key, "Bitrate") == 0) {
     i = g_variant_get_int32 (value);
     if (grl_media_is_audio (media)) {
-      grl_media_set_bitrate (media, i);
+      /* DLNA res@bitrate is in bits/second
+       * (see guidelines at https://www.dlna.org/guidelines).
+       * Convert to kbits/second.
+       */
+      grl_media_set_bitrate (media, i / 1000);
     }
   }
   else if (g_strcmp0 (key, "AlbumArtURL") == 0) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]