static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options)

{

    int ret;

    AVProbeData pd = {filename, NULL, 0};



    if(s->iformat && !strlen(filename))

        return 0;



    if (s->pb) {

        s->flags |= AVFMT_FLAG_CUSTOM_IO;

        if (!s->iformat)

            return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);

        else if (s->iformat->flags & AVFMT_NOFILE)

            av_log(s, AV_LOG_WARNING, "Custom AVIOContext makes no sense and "

                                      "will be ignored with AVFMT_NOFILE format.\n");

        return 0;

    }



    if ( (s->iformat && s->iformat->flags & AVFMT_NOFILE) ||

        (!s->iformat && (s->iformat = av_probe_input_format(&pd, 0))))

        return 0;



    if ((ret = avio_open2(&s->pb, filename, AVIO_FLAG_READ,

                          &s->interrupt_callback, options)) < 0)

        return ret;

    if (s->iformat)

        return 0;

    return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);

}

static int init_input(AVFormatContext *s, const char *filename, AVDictionary **options)

{

    int ret;

    AVProbeData pd = {filename, NULL, 0};



    if(s->iformat && !strlen(filename))

        return 0;



    if (s->pb) {

        s->flags |= AVFMT_FLAG_CUSTOM_IO;

        if (!s->iformat)

            return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);

        else if (s->iformat->flags & AVFMT_NOFILE)

            av_log(s, AV_LOG_WARNING, "Custom AVIOContext makes no sense and "

                                      "will be ignored with AVFMT_NOFILE format.\n");

        return 0;

    }



    if ( (s->iformat && s->iformat->flags & AVFMT_NOFILE) ||

        (!s->iformat && (s->iformat = av_probe_input_format(&pd, 0))))

        return 0;



    if ((ret = avio_open2(&s->pb, filename, AVIO_FLAG_READ,

                          &s->interrupt_callback, options)) < 0)

        return ret;

    if (s->iformat)

        return 0;

    return av_probe_input_buffer(s->pb, &s->iformat, filename, s, 0, 0);

}

    if(s->iformat && !strlen(filename))         return 0;
static int FUNC_0(AVFormatContext *VAR_0, const char *VAR_1, AVDictionary **VAR_2)

{

    int VAR_3;

    AVProbeData pd = {VAR_1, NULL, 0};



    if(VAR_0->iformat && !strlen(VAR_1))

        return 0;



    if (VAR_0->pb) {

        VAR_0->flags |= AVFMT_FLAG_CUSTOM_IO;

        if (!VAR_0->iformat)

            return av_probe_input_buffer(VAR_0->pb, &VAR_0->iformat, VAR_1, VAR_0, 0, 0);

        else if (VAR_0->iformat->flags & AVFMT_NOFILE)

            av_log(VAR_0, AV_LOG_WARNING, "Custom AVIOContext makes no sense and "

                                      "will be ignored with AVFMT_NOFILE format.\n");

        return 0;

    }



    if ( (VAR_0->iformat && VAR_0->iformat->flags & AVFMT_NOFILE) ||

        (!VAR_0->iformat && (VAR_0->iformat = av_probe_input_format(&pd, 0))))

        return 0;



    if ((VAR_3 = avio_open2(&VAR_0->pb, VAR_1, AVIO_FLAG_READ,

                          &VAR_0->interrupt_callback, VAR_2)) < 0)

        return VAR_3;

    if (VAR_0->iformat)

        return 0;

    return av_probe_input_buffer(VAR_0->pb, &VAR_0->iformat, VAR_1, VAR_0, 0, 0);

}

static int FUNC_0(AVFormatContext *VAR_0, const char *VAR_1, AVDictionary **VAR_2)
{ int VAR_3; AVProbeData pd = {VAR_1, NULL, 0}; if(VAR_0->iformat && !strlen(VAR_1))
return 0; if (VAR_0->pb) { VAR_0->flags |= AVFMT_FLAG_CUSTOM_IO; if (!VAR_0->iformat)
return av_probe_input_buffer(VAR_0->pb, &VAR_0->iformat, VAR_1, VAR_0, 0, 0); else if (VAR_0->iformat->flags & AVFMT_NOFILE)
av_log(VAR_0, AV_LOG_WARNING, "Custom AVIOContext makes no sense and "
"will be ignored with AVFMT_NOFILE format.\n"); return 0; } if ( (VAR_0->iformat && VAR_0->iformat->flags & AVFMT_NOFILE) ||
(!VAR_0->iformat && (VAR_0->iformat = av_probe_input_format(&pd, 0))))
return 0; if ((VAR_3 = avio_open2(&VAR_0->pb, VAR_1, AVIO_FLAG_READ,
&VAR_0->interrupt_callback, VAR_2)) < 0)
return VAR_3; if (VAR_0->iformat)
return 0; return av_probe_input_buffer(VAR_0->pb, &VAR_0->iformat, VAR_1, VAR_0, 0, 0); }