static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)

{

    const char *codec_string = encoder ? "encoder" : "decoder";

    AVCodec *codec;



    if(!name)

        return CODEC_ID_NONE;

    codec = encoder ?

        avcodec_find_encoder_by_name(name) :

        avcodec_find_decoder_by_name(name);

    if(!codec) {

        fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);

        ffmpeg_exit(1);

    }

    if(codec->type != type) {

        fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);

        ffmpeg_exit(1);

    }

    if(codec->capabilities & CODEC_CAP_EXPERIMENTAL &&

       strict > FF_COMPLIANCE_EXPERIMENTAL) {

        fprintf(stderr, "%s '%s' is experimental and might produce bad "

                "results.\nAdd '-strict experimental' if you want to use it.\n",

                codec_string, codec->name);

        codec = encoder ?

            avcodec_find_encoder(codec->id) :

            avcodec_find_decoder(codec->id);

        if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL))

            fprintf(stderr, "Or use the non experimental %s '%s'.\n",

                    codec_string, codec->name);

        ffmpeg_exit(1);

    }

    return codec->id;

}

static enum CodecID find_codec_or_die(const char *name, int type, int encoder, int strict)

{

    const char *codec_string = encoder ? "encoder" : "decoder";

    AVCodec *codec;



    if(!name)

        return CODEC_ID_NONE;

    codec = encoder ?

        avcodec_find_encoder_by_name(name) :

        avcodec_find_decoder_by_name(name);

    if(!codec) {

        fprintf(stderr, "Unknown %s '%s'\n", codec_string, name);

        ffmpeg_exit(1);

    }

    if(codec->type != type) {

        fprintf(stderr, "Invalid %s type '%s'\n", codec_string, name);

        ffmpeg_exit(1);

    }

    if(codec->capabilities & CODEC_CAP_EXPERIMENTAL &&

       strict > FF_COMPLIANCE_EXPERIMENTAL) {

        fprintf(stderr, "%s '%s' is experimental and might produce bad "

                "results.\nAdd '-strict experimental' if you want to use it.\n",

                codec_string, codec->name);

        codec = encoder ?

            avcodec_find_encoder(codec->id) :

            avcodec_find_decoder(codec->id);

        if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL))

            fprintf(stderr, "Or use the non experimental %s '%s'.\n",

                    codec_string, codec->name);

        ffmpeg_exit(1);

    }

    return codec->id;

}

static enum CodecID FUNC_0(const char *VAR_0, int VAR_1, int VAR_2, int VAR_3)

{

    const char *VAR_4 = VAR_2 ? "VAR_2" : "decoder";

    AVCodec *codec;



    if(!VAR_0)

        return CODEC_ID_NONE;

    codec = VAR_2 ?

        avcodec_find_encoder_by_name(VAR_0) :

        avcodec_find_decoder_by_name(VAR_0);

    if(!codec) {

        fprintf(stderr, "Unknown %s '%s'\n", VAR_4, VAR_0);

        ffmpeg_exit(1);

    }

    if(codec->VAR_1 != VAR_1) {

        fprintf(stderr, "Invalid %s VAR_1 '%s'\n", VAR_4, VAR_0);

        ffmpeg_exit(1);

    }

    if(codec->capabilities & CODEC_CAP_EXPERIMENTAL &&

       VAR_3 > FF_COMPLIANCE_EXPERIMENTAL) {

        fprintf(stderr, "%s '%s' is experimental and might produce bad "

                "results.\nAdd '-VAR_3 experimental' if you want to use it.\n",

                VAR_4, codec->VAR_0);

        codec = VAR_2 ?

            avcodec_find_encoder(codec->id) :

            avcodec_find_decoder(codec->id);

        if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL))

            fprintf(stderr, "Or use the non experimental %s '%s'.\n",

                    VAR_4, codec->VAR_0);

        ffmpeg_exit(1);

    }

    return codec->id;

}

static enum CodecID FUNC_0(const char *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{ const char *VAR_4 = VAR_2 ? "VAR_2" : "decoder"; AVCodec *codec; if(!VAR_0)
return CODEC_ID_NONE; codec = VAR_2 ?
avcodec_find_encoder_by_name(VAR_0) :
avcodec_find_decoder_by_name(VAR_0); if(!codec) { fprintf(stderr, "Unknown %s '%s'\n", VAR_4, VAR_0); ffmpeg_exit(1); } if(codec->VAR_1 != VAR_1) { fprintf(stderr, "Invalid %s VAR_1 '%s'\n", VAR_4, VAR_0); ffmpeg_exit(1); } if(codec->capabilities & CODEC_CAP_EXPERIMENTAL &&
VAR_3 > FF_COMPLIANCE_EXPERIMENTAL) { fprintf(stderr, "%s '%s' is experimental and might produce bad "
"results.\nAdd '-VAR_3 experimental' if you want to use it.\n",
VAR_4, codec->VAR_0); codec = VAR_2 ?
avcodec_find_encoder(codec->id) :
avcodec_find_decoder(codec->id); if (!(codec->capabilities & CODEC_CAP_EXPERIMENTAL))
fprintf(stderr, "Or use the non experimental %s '%s'.\n",
VAR_4, codec->VAR_0); ffmpeg_exit(1); } return codec->id; }