Revision 2f3d7ea9

View differences:

libavformat/flvdec.c
391 391
    }
392 392

  
393 393
    if(is_audio){
394
        if(!st->codec->channels || !st->codec->sample_rate || !st->codec->bits_per_coded_sample || (!st->codec->codec_id && !st->codec->codec_tag)) {
394
        if(!st->codec->channels || !st->codec->sample_rate || !st->codec->bits_per_coded_sample) {
395 395
            st->codec->channels = (flags & FLV_AUDIO_CHANNEL_MASK) == FLV_STEREO ? 2 : 1;
396 396
            st->codec->sample_rate = (44100 << ((flags & FLV_AUDIO_SAMPLERATE_MASK) >> FLV_AUDIO_SAMPLERATE_OFFSET) >> 3);
397 397
            st->codec->bits_per_coded_sample = (flags & FLV_AUDIO_SAMPLESIZE_MASK) ? 16 : 8;
398
        }
399
        if(!st->codec->codec_id){
398 400
            flv_set_audio_codec(s, st, flags & FLV_AUDIO_CODECID_MASK);
399 401
        }
400 402
    }else{

Also available in: Unified diff