enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,

                              const char *filename, const char *mime_type,

                              enum AVMediaType type)

{

    if (av_match_name("segment", fmt->name) || av_match_name("ssegment", fmt->name)) {

        fmt = av_guess_format(NULL, filename, NULL);

    }



    if (type == AVMEDIA_TYPE_VIDEO) {

        enum AVCodecID codec_id = AV_CODEC_ID_NONE;



#if CONFIG_IMAGE2_MUXER

        if (!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")) {

            codec_id = ff_guess_image2_codec(filename);

        }

#endif

        if (codec_id == AV_CODEC_ID_NONE)

            codec_id = fmt->video_codec;

        return codec_id;

    } else if (type == AVMEDIA_TYPE_AUDIO)

        return fmt->audio_codec;

    else if (type == AVMEDIA_TYPE_SUBTITLE)

        return fmt->subtitle_codec;

    else

        return AV_CODEC_ID_NONE;

}

enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,

                              const char *filename, const char *mime_type,

                              enum AVMediaType type)

{

    if (av_match_name("segment", fmt->name) || av_match_name("ssegment", fmt->name)) {

        fmt = av_guess_format(NULL, filename, NULL);

    }



    if (type == AVMEDIA_TYPE_VIDEO) {

        enum AVCodecID codec_id = AV_CODEC_ID_NONE;



#if CONFIG_IMAGE2_MUXER

        if (!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")) {

            codec_id = ff_guess_image2_codec(filename);

        }

#endif

        if (codec_id == AV_CODEC_ID_NONE)

            codec_id = fmt->video_codec;

        return codec_id;

    } else if (type == AVMEDIA_TYPE_AUDIO)

        return fmt->audio_codec;

    else if (type == AVMEDIA_TYPE_SUBTITLE)

        return fmt->subtitle_codec;

    else

        return AV_CODEC_ID_NONE;

}

        fmt = av_guess_format(NULL, filename, NULL);
enum AVCodecID FUNC_0(AVOutputFormat *VAR_0, const char *VAR_1,

                              const char *VAR_2, const char *VAR_3,

                              enum AVMediaType VAR_4)

{

    if (av_match_name("segment", VAR_0->name) || av_match_name("ssegment", VAR_0->name)) {

        VAR_0 = av_guess_format(NULL, VAR_2, NULL);

    }



    if (VAR_4 == AVMEDIA_TYPE_VIDEO) {

        enum AVCodecID VAR_5 = AV_CODEC_ID_NONE;



#if CONFIG_IMAGE2_MUXER

        if (!strcmp(VAR_0->name, "image2") || !strcmp(VAR_0->name, "image2pipe")) {

            VAR_5 = ff_guess_image2_codec(VAR_2);

        }

#endif

        if (VAR_5 == AV_CODEC_ID_NONE)

            VAR_5 = VAR_0->video_codec;

        return VAR_5;

    } else if (VAR_4 == AVMEDIA_TYPE_AUDIO)

        return VAR_0->audio_codec;

    else if (VAR_4 == AVMEDIA_TYPE_SUBTITLE)

        return VAR_0->subtitle_codec;

    else

        return AV_CODEC_ID_NONE;

}

enum AVCodecID FUNC_0(AVOutputFormat *VAR_0, const char *VAR_1,
const char *VAR_2, const char *VAR_3,
enum AVMediaType VAR_4)
{ if (av_match_name("segment", VAR_0->name) || av_match_name("ssegment", VAR_0->name)) { VAR_0 = av_guess_format(NULL, VAR_2, NULL); } if (VAR_4 == AVMEDIA_TYPE_VIDEO) { enum AVCodecID VAR_5 = AV_CODEC_ID_NONE; #if CONFIG_IMAGE2_MUXER
if (!strcmp(VAR_0->name, "image2") || !strcmp(VAR_0->name, "image2pipe")) { VAR_5 = ff_guess_image2_codec(VAR_2); } #endif
if (VAR_5 == AV_CODEC_ID_NONE)
VAR_5 = VAR_0->video_codec; return VAR_5; } else if (VAR_4 == AVMEDIA_TYPE_AUDIO) return VAR_0->audio_codec; else if (VAR_4 == AVMEDIA_TYPE_SUBTITLE)
return VAR_0->subtitle_codec; else
return AV_CODEC_ID_NONE; }