Changeset 37402ad5d32c33a0f6f76eda0cb39d6b2339062e

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

[b07357af26f3b5dadbea7fa1f255a3d0fc0de630]

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

Check against 0 sample rate (returned by ffmpeg).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/avcodec/audio.c

    r37a2578 r37402ad  
    308308    p_block->p_buffer += i_used; 
    309309 
    310     if( p_sys->p_context->channels <= 0 || p_sys->p_context->channels > 6 ) 
    311     { 
    312         msg_Warn( p_dec, "invalid channels count %d", 
    313                   p_sys->p_context->channels ); 
     310    if( p_sys->p_context->channels <= 0 || p_sys->p_context->channels > 6 || 
     311        p_sys->p_context->sample_rate <= 0 ) 
     312    { 
     313        msg_Warn( p_dec, "invalid audio properties channels count %d, sample rate %d", 
     314                  p_sys->p_context->channels, p_sys->p_context->sample_rate ); 
    314315        block_Release( p_block ); 
    315316        return NULL;