Revision e83c716e libavcodec/utils.c

View differences:

libavcodec/utils.c
524 524
        avctx->codec_type = codec->type;
525 525
        avctx->codec_id   = codec->id;
526 526
    }
527
    if(avctx->codec_id != codec->id || avctx->codec_type != codec->type){
527
    if (avctx->codec_id != codec->id || (avctx->codec_type != codec->type
528
                           && avctx->codec_type != AVMEDIA_TYPE_ATTACHMENT)) {
528 529
        av_log(avctx, AV_LOG_ERROR, "codec type or id mismatches\n");
529 530
        goto free_and_end;
530 531
    }

Also available in: Unified diff