Revision 012e4f5a libavcodec/pcm.c

View differences:

libavcodec/pcm.c
361 361
    n = avctx->channels * sample_size;
362 362

  
363 363
    if(n && buf_size % n){
364
        if (buf_size < n) {
364 365
        av_log(avctx, AV_LOG_ERROR, "invalid PCM packet\n");
365 366
        return -1;
367
        }else
368
            buf_size -= buf_size % n;
366 369
    }
367 370

  
368 371
    buf_size= FFMIN(buf_size, *data_size/2);

Also available in: Unified diff