static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)
{
    const char *codec_string = encoder ? "encoder" : "decoder";
    AVCodec *codec;
    codec = encoder ?
        avcodec_find_encoder_by_name(name) :
        avcodec_find_decoder_by_name(name);
    if (!codec) {
        av_log(NULL, AV_LOG_FATAL, "Unknown %s '%s'\n", codec_string, name);
        exit_program(1);
    }
    if (codec->type != type) {
        av_log(NULL, AV_LOG_FATAL, "Invalid %s type '%s'\n", codec_string, name);
        exit_program(1);
    }
    return codec;
}
['static AVCodec *find_codec_or_die(const char *name, enum AVMediaType type, int encoder)\n{\n    const char *codec_string = encoder ? "encoder" : "decoder";\n    AVCodec *codec;\n    codec = encoder ?\n        avcodec_find_encoder_by_name(name) :\n        avcodec_find_decoder_by_name(name);\n    if (!codec) {\n        av_log(NULL, AV_LOG_FATAL, "Unknown %s \'%s\'\\n", codec_string, name);\n        exit_program(1);\n    }\n    if (codec->type != type) {\n        av_log(NULL, AV_LOG_FATAL, "Invalid %s type \'%s\'\\n", codec_string, name);\n        exit_program(1);\n    }\n    return codec;\n}']