Revision ca402f32 libavformat/riff.c

View differences:

libavformat/riff.c
480 480
 * WAVEFORMATEX adds 'WORD  cbSize' and basically makes itself
481 481
 * an openended structure.
482 482
 */
483
void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
483
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
484 484
{
485 485
    int id;
486 486

  
......
510 510
        codec->extradata_size = cbSize;
511 511
        if (cbSize > 0) {
512 512
            codec->extradata = av_mallocz(codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
513
            if (!codec->extradata)
514
                return AVERROR(ENOMEM);
513 515
            avio_read(pb, codec->extradata, codec->extradata_size);
514 516
            size -= cbSize;
515 517
        }
......
524 526
        codec->channels    = 0;
525 527
        codec->sample_rate = 0;
526 528
    }
529

  
530
    return 0;
527 531
}
528 532

  
529 533

  

Also available in: Unified diff