Changeset 4e72534d7da8bb2cda63791ffe4d611e7dcf0929

Show
Ignore:
Timestamp:
06/29/08 18:23:12 (2 months ago)
Author:
Laurent Aimar <fenrir@videolan.org>
git-committer:
Laurent Aimar <fenrir@videolan.org> 1214756592 +0000
git-parent:

[37402ad5d32c33a0f6f76eda0cb39d6b2339062e]

git-author:
Laurent Aimar <fenrir@videolan.org> 1214756592 +0000
Message:

Check against too low sample rate and 0 channel count (avoid division by 0)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/audio_output/dec.c

    re0c708f r4e72534  
    6060        return NULL; 
    6161    } 
     62    if( p_format->i_channels <= 0 ) 
     63    { 
     64        msg_Err( p_aout, "no audio channels" ); 
     65        return NULL; 
     66    } 
    6267 
    6368    if( p_format->i_rate > 192000 ) 
    6469    { 
    6570        msg_Err( p_aout, "excessive audio sample frequency (%u)", 
     71                 p_format->i_rate ); 
     72        return NULL; 
     73    } 
     74    if( p_format->i_rate < 4000 ) 
     75    { 
     76        msg_Err( p_aout, "too low audio sample frequency (%u)", 
    6677                 p_format->i_rate ); 
    6778        return NULL;