changeset 778:209b08a3eff6 trunk

[svn] - hide seek bar for unseekable (info->size = 0) stream.
author yaz
date Sat, 03 Mar 2007 22:55:57 -0800
parents 13bb2cf2f9e6
children 5f53309bb7d8
files ChangeLog src/madplug/decoder.c
diffstat 2 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Mar 03 19:27:40 2007 -0800
+++ b/ChangeLog	Sat Mar 03 22:55:57 2007 -0800
@@ -1,3 +1,11 @@
+2007-03-04 03:27:40 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [1652]
+  - ishttp() should check string is not NULL. closes #832.
+  
+  trunk/src/scrobbler/plugin.c |    1 +
+  1 file changed, 1 insertion(+)
+
+
 2007-03-04 01:36:01 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [1650]
   - by unknown reason, http connection via proxy server needs a transfer stop after tag retrieving.
--- a/src/madplug/decoder.c	Sat Mar 03 19:27:40 2007 -0800
+++ b/src/madplug/decoder.c	Sat Mar 03 22:55:57 2007 -0800
@@ -431,7 +431,7 @@
     
     tlen = (gint) mad_timer_count(info->duration, MAD_UNITS_MILLISECONDS),
         mad_plugin->set_info(info->title,
-                             tlen == 0 ? -1 : tlen,
+                             (tlen == 0 || info->size <= 0) ? -1 : tlen,
                              info->bitrate, info->freq, info->channels);
 #ifdef DEBUG
     g_message("decode: tlen = %d\n", tlen);
@@ -496,7 +496,7 @@
         }
 
         while (info->playback->playing) {
-            if (info->seek != -1 && info->size != 0) {
+            if (info->seek != -1 && info->size > 0) {
 #ifdef DEBUG
                 g_message("seeking: %d", info->seek);
 #endif
@@ -551,9 +551,12 @@
 
             info->bitrate = frame.header.bitrate;
 
-            if (!info->remote && !audmad_config.show_avg_vbr_bitrate && info->vbr && (iteration % 40 == 0)) {
+            if (!audmad_config.show_avg_vbr_bitrate && info->vbr && (iteration % 40 == 0)) {
+#ifdef DEBUG
+                g_message("decode vbr tlen = %d", tlen);
+#endif
                 mad_plugin->set_info(info->title,
-                                     tlen == 0 ? -1 : tlen,
+                                     (tlen == 0 || info->size <= 0) ? -1 : tlen,
                                      info->bitrate, info->freq, info->channels);
             }
             iteration++;