mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-23 09:59:54 +00:00
src/alac.c : Fix calculated frame count for files with zero block count.
This commit is contained in:
parent
5e10b3ccdf
commit
aeea6cac0f
@ -4,6 +4,9 @@
|
||||
Add improved handling of custom chunk getting and settings. Set of patches
|
||||
from IOhannes m zmoelnig submitted via github pull request #6.
|
||||
|
||||
* src/alac.c
|
||||
Fix calculated frame count for files with zero block length.
|
||||
|
||||
2012-02-13 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
|
||||
|
||||
* src/avr.c
|
||||
|
@ -373,6 +373,9 @@ alac_reader_calc_frames (SF_PRIVATE *psf, ALAC_PRIVATE *plac)
|
||||
blocks = current_pos > 0 ? blocks + 1 : blocks ;
|
||||
} ;
|
||||
|
||||
if (blocks == 0)
|
||||
return 0 ;
|
||||
|
||||
/* Only count full blocks. */
|
||||
frames = plac->frames_per_block * (blocks - 1) ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user