AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precission)

{

    AVRational q;

    int j;



    if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {

        q = (AVRational){1, st->codec->sample_rate};

    } else {

        q = st->codec->time_base;

    }

    for (j=2; j<2000; j+= 1+(j>2))

        while (q.den / q.num < min_precission && q.num % j == 0)

            q.num /= j;

    while (q.den / q.num < min_precission && q.den < (1<<24))

        q.den <<= 1;



    return q;

}

AVRational ff_choose_timebase(AVFormatContext *s, AVStream *st, int min_precission)

{

    AVRational q;

    int j;



    if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {

        q = (AVRational){1, st->codec->sample_rate};

    } else {

        q = st->codec->time_base;

    }

    for (j=2; j<2000; j+= 1+(j>2))

        while (q.den / q.num < min_precission && q.num % j == 0)

            q.num /= j;

    while (q.den / q.num < min_precission && q.den < (1<<24))

        q.den <<= 1;



    return q;

}

    for (j=2; j<2000; j+= 1+(j>2))
AVRational FUNC_0(AVFormatContext *s, AVStream *st, int min_precission)

{

    AVRational q;

    int VAR_0;



    if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {

        q = (AVRational){1, st->codec->sample_rate};

    } else {

        q = st->codec->time_base;

    }

    for (VAR_0=2; VAR_0<2000; VAR_0+= 1+(VAR_0>2))

        while (q.den / q.num < min_precission && q.num % VAR_0 == 0)

            q.num /= VAR_0;

    while (q.den / q.num < min_precission && q.den < (1<<24))

        q.den <<= 1;



    return q;

}

AVRational FUNC_0(AVFormatContext *s, AVStream *st, int min_precission)
{ AVRational q; int VAR_0; if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) { q = (AVRational){1, st->codec->sample_rate}; } else { q = st->codec->time_base; } for (VAR_0=2; VAR_0<2000; VAR_0+= 1+(VAR_0>2)) while (q.den / q.num < min_precission && q.num % VAR_0 == 0)
q.num /= VAR_0; while (q.den / q.num < min_precission && q.den < (1<<24))
q.den <<= 1; return q; }