File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -168,10 +168,10 @@ public function parseMETAdata() {
168168 $ info ['flac ' ]['compressed_audio_bytes ' ] = $ info ['avdataend ' ] - $ info ['avdataoffset ' ];
169169 }
170170 $ info ['flac ' ]['uncompressed_audio_bytes ' ] = $ info ['flac ' ]['STREAMINFO ' ]['samples_stream ' ] * $ info ['flac ' ]['STREAMINFO ' ]['channels ' ] * ($ info ['flac ' ]['STREAMINFO ' ]['bits_per_sample ' ] / 8 );
171- if ($ info ['flac ' ]['uncompressed_audio_bytes ' ] == 0 ) {
171+ if ($ info ['flac ' ]['uncompressed_audio_bytes ' ] == 0 && $ info [ ' flac ' ][ ' STREAMINFO ' ][ ' samples_stream ' ] > 0 ) {
172172 return $ this ->error ('Corrupt FLAC file: uncompressed_audio_bytes == zero ' );
173173 }
174- if (!empty ($ info ['flac ' ]['compressed_audio_bytes ' ])) {
174+ if (!empty ($ info ['flac ' ]['compressed_audio_bytes ' ]) && $ info [ ' flac ' ][ ' STREAMINFO ' ][ ' samples_stream ' ] > 0 ) {
175175 $ info ['flac ' ]['compression_ratio ' ] = $ info ['flac ' ]['compressed_audio_bytes ' ] / $ info ['flac ' ]['uncompressed_audio_bytes ' ];
176176 }
177177 }
You can’t perform that action at this time.
0 commit comments