Revision 42396c2e libavformat/electronicarts.c

View differences:

libavformat/electronicarts.c
422 422
        st->codec->height = ea->height;
423 423
    }
424 424

  
425
    if (ea->num_channels <= 0) {
426
        av_log(s, AV_LOG_WARNING, "Unsupported number of channels: %d\n", ea->num_channels);
427
        ea->audio_codec = 0;
428
    }
429

  
430
    if (ea->sample_rate <= 0) {
431
        av_log(s, AV_LOG_ERROR, "Unsupported sample rate: %d\n", ea->sample_rate);
432
        ea->audio_codec = 0;
433
    }
434

  
435 425
    if (ea->audio_codec) {
426
        if (ea->num_channels <= 0) {
427
            av_log(s, AV_LOG_WARNING, "Unsupported number of channels: %d\n", ea->num_channels);
428
            ea->audio_codec = 0;
429
            return 1;
430
        }
431
        if (ea->sample_rate <= 0) {
432
            av_log(s, AV_LOG_ERROR, "Unsupported sample rate: %d\n", ea->sample_rate);
433
            ea->audio_codec = 0;
434
            return 1;
435
        }
436

  
436 437
        /* initialize the audio decoder stream */
437 438
        st = av_new_stream(s, 0);
438 439
        if (!st)

Also available in: Unified diff