Revision 681c180d

View differences:

libavcodec/utils.c
480 480
    }
481 481

  
482 482
    avctx->codec = codec;
483
    if ((avctx->codec_type == CODEC_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
484
        avctx->codec_id == CODEC_ID_NONE) {
485
        avctx->codec_type = codec->type;
486
        avctx->codec_id   = codec->id;
487
    }
483 488
    if(avctx->codec_id != codec->id || avctx->codec_type != codec->type){
484 489
        av_log(avctx, AV_LOG_ERROR, "codec type or id mismatches\n");
485 490
        goto free_and_end;

Also available in: Unified diff