summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mpgmad/mpgmad.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c
index 9e51ae6d..54f57ffd 100644
--- a/plugins/mpgmad/mpgmad.c
+++ b/plugins/mpgmad/mpgmad.c
@@ -522,7 +522,10 @@ cmp3_scan_stream (buffer_t *buffer, int sample) {
if (fsize >= 0) {
buffer->bitrate = (fsize - deadbeef->ftell (buffer->file))/ buffer->samplerate * 1000;
}
- return 0;
+ if (buffer->vbr != DETECTED_VBR && buffer->vbr != XING_CBR) {
+ // let's don't trust xing header on constant bitrate value, and calculate it ourselves
+ return 0;
+ }
}
}
}