static int vobsub_read_seek(AVFormatContext *s, int stream_index,

                            int64_t min_ts, int64_t ts, int64_t max_ts, int flags)

{

    MpegDemuxContext *vobsub = s->priv_data;



    /* Rescale requested timestamps based on the first stream (timebase is the

     * same for all subtitles stream within a .idx/.sub). Rescaling is done just

     * like in avformat_seek_file(). */

    if (stream_index == -1 && s->nb_streams != 1) {

        int i, ret = 0;

        AVRational time_base = s->streams[0]->time_base;

        ts = av_rescale_q(ts, AV_TIME_BASE_Q, time_base);

        min_ts = av_rescale_rnd(min_ts, time_base.den,

                                time_base.num * (int64_t)AV_TIME_BASE,

                                AV_ROUND_UP   | AV_ROUND_PASS_MINMAX);

        max_ts = av_rescale_rnd(max_ts, time_base.den,

                                time_base.num * (int64_t)AV_TIME_BASE,

                                AV_ROUND_DOWN | AV_ROUND_PASS_MINMAX);

        for (i = 0; i < s->nb_streams; i++) {

            int r = ff_subtitles_queue_seek(&vobsub->q[i], s, stream_index,

                                            min_ts, ts, max_ts, flags);

            if (r < 0)

                ret = r;

        }

        return ret;

    }





    return ff_subtitles_queue_seek(&vobsub->q[stream_index], s, stream_index,

                                   min_ts, ts, max_ts, flags);

}
static int vobsub_read_seek(AVFormatContext *s, int stream_index,

                            int64_t min_ts, int64_t ts, int64_t max_ts, int flags)

{

    MpegDemuxContext *vobsub = s->priv_data;



    





    if (stream_index == -1 && s->nb_streams != 1) {

        int i, ret = 0;

        AVRational time_base = s->streams[0]->time_base;

        ts = av_rescale_q(ts, AV_TIME_BASE_Q, time_base);

        min_ts = av_rescale_rnd(min_ts, time_base.den,

                                time_base.num * (int64_t)AV_TIME_BASE,

                                AV_ROUND_UP   | AV_ROUND_PASS_MINMAX);

        max_ts = av_rescale_rnd(max_ts, time_base.den,

                                time_base.num * (int64_t)AV_TIME_BASE,

                                AV_ROUND_DOWN | AV_ROUND_PASS_MINMAX);

        for (i = 0; i < s->nb_streams; i++) {

            int r = ff_subtitles_queue_seek(&vobsub->q[i], s, stream_index,

                                            min_ts, ts, max_ts, flags);

            if (r < 0)

                ret = r;

        }

        return ret;

    }





    return ff_subtitles_queue_seek(&vobsub->q[stream_index], s, stream_index,

                                   min_ts, ts, max_ts, flags);

}
static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,

                            int64_t VAR_2, int64_t VAR_3, int64_t VAR_4, int VAR_5)

{

    MpegDemuxContext *vobsub = VAR_0->priv_data;



    





    if (VAR_1 == -1 && VAR_0->nb_streams != 1) {

        int VAR_6, VAR_7 = 0;

        AVRational time_base = VAR_0->streams[0]->time_base;

        VAR_3 = av_rescale_q(VAR_3, AV_TIME_BASE_Q, time_base);

        VAR_2 = av_rescale_rnd(VAR_2, time_base.den,

                                time_base.num * (int64_t)AV_TIME_BASE,

                                AV_ROUND_UP   | AV_ROUND_PASS_MINMAX);

        VAR_4 = av_rescale_rnd(VAR_4, time_base.den,

                                time_base.num * (int64_t)AV_TIME_BASE,

                                AV_ROUND_DOWN | AV_ROUND_PASS_MINMAX);

        for (VAR_6 = 0; VAR_6 < VAR_0->nb_streams; VAR_6++) {

            int r = ff_subtitles_queue_seek(&vobsub->q[VAR_6], VAR_0, VAR_1,

                                            VAR_2, VAR_3, VAR_4, VAR_5);

            if (r < 0)

                VAR_7 = r;

        }

        return VAR_7;

    }





    return ff_subtitles_queue_seek(&vobsub->q[VAR_1], VAR_0, VAR_1,

                                   VAR_2, VAR_3, VAR_4, VAR_5);

}
static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
int64_t VAR_2, int64_t VAR_3, int64_t VAR_4, int VAR_5)
{ MpegDemuxContext *vobsub = VAR_0->priv_data; if (VAR_1 == -1 && VAR_0->nb_streams != 1) { int VAR_6, VAR_7 = 0; AVRational time_base = VAR_0->streams[0]->time_base; VAR_3 = av_rescale_q(VAR_3, AV_TIME_BASE_Q, time_base); VAR_2 = av_rescale_rnd(VAR_2, time_base.den,
time_base.num * (int64_t)AV_TIME_BASE,
AV_ROUND_UP   | AV_ROUND_PASS_MINMAX); VAR_4 = av_rescale_rnd(VAR_4, time_base.den,
time_base.num * (int64_t)AV_TIME_BASE,
AV_ROUND_DOWN | AV_ROUND_PASS_MINMAX); for (VAR_6 = 0; VAR_6 < VAR_0->nb_streams; VAR_6++) { int r = ff_subtitles_queue_seek(&vobsub->q[VAR_6], VAR_0, VAR_1,
VAR_2, VAR_3, VAR_4, VAR_5); if (r < 0)
VAR_7 = r; } return VAR_7; } return ff_subtitles_queue_seek(&vobsub->q[VAR_1], VAR_0, VAR_1,
VAR_2, VAR_3, VAR_4, VAR_5); }