Mercurial > audlegacy-plugins
diff src/madplug/decoder.c @ 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 | 22c82f3c0411 |
children | 83a38bcfe7c8 |
line wrap: on
line diff
--- 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++;