changeset 1749:d2e3eef90719

- Read the correct amount of data from the buffer when handling ShoutCast metadata
author Ralf Ertzinger <ralf@skytale.net>
date Wed, 19 Sep 2007 17:33:22 +0200
parents 4f4634573e41
children 96bb39f615cd
files src/neon/neon.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/neon/neon.c	Wed Sep 19 14:36:37 2007 +0200
+++ b/src/neon/neon.c	Wed Sep 19 17:33:22 2007 +0200
@@ -940,7 +940,7 @@
          * The maximum number of bytes we can deliver is determined
          * by the number of bytes left until the next metadata announcement
          */
-        belem = h->icy_metaleft / size;
+        belem = MIN(used_rb(&h->rb), h->icy_metaleft) / size;
     } else {
         belem = used_rb(&h->rb) / size;
     }