lib/mp3file/mp3_file.rb in mp3file-1.1.3 vs lib/mp3file/mp3_file.rb in mp3file-1.1.4
- old
+ new
@@ -216,10 +216,10 @@
# If the file looks like it's a VBR file, do an averate bitrate
# calculation, either using the Xing header's idea of the file
# size or the one we found.
if @vbr
- @bitrate = (@xing_header.bytes || @audio_size) / @length.to_f * 8 / 1000
+ @bitrate = ((@xing_header && @xing_header.bytes) || @audio_size) / @length.to_f * 8 / 1000
end
@file.close
end