Changeset 21e5b32ec1b3fdddbe73d6523b9c96cdba8c965a

Show
Ignore:
Timestamp:
06/07/07 18:53:15 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1181235195 +0000
git-parent:

[16db52715f0f5bf0119cbad43223f756dc3fa15a]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1181235195 +0000
Message:

Sanitize audio format before creating a decoder

Files:

Legend:

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

    r3f035aa r21e5b32  
    5252    vlc_value_t val; 
    5353 
     54    /* Sanitize audio format */ 
     55    if( p_format->i_channels > 32 ) 
     56    { 
     57        msg_Err( p_aout, "too many audio channels (%u)", 
     58                 p_format->i_channels ); 
     59        goto error; 
     60    } 
     61 
     62    if( p_format->i_rate > 192000 ) 
     63    { 
     64        msg_Err( p_aout, "excessive audio sample frequency (%u)", 
     65                 p_format->i_rate ); 
     66        goto error; 
     67    } 
     68 
    5469    /* We can only be called by the decoder, so no need to lock 
    5570     * p_input->lock. */