Opened 5 years ago

Last modified 21 months ago

#8579 new defect

a tiny timestamp error in ffplay

Reported by: elite_jwp Owned by:
Priority: normal Component: ffplay
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

At ffplay.c:3004 there is a code block as below:

        if (!is->paused &&
            (!is->audio_st || (is->auddec.finished == is->audioq.serial && frame_queue_nb_remaining(&is->sampq) == 0)) &&
            (!is->video_st || (is->viddec.finished == is->videoq.serial && frame_queue_nb_remaining(&is->pictq) == 0))) {
            if (loop != 1 && (!loop || --loop)) {
                stream_seek(is, start_time != AV_NOPTS_VALUE ? start_time : 0, 0, 0);
            } else if (autoexit) {
                ret = AVERROR_EOF;
                goto fail;
            }
        }

When using stream_seek with start_time, it doesn't add the stream start time just like code at ffplay.c:2896:

        timestamp = start_time;
        /* add the stream start time */
        if (ic->start_time != AV_NOPTS_VALUE)
            timestamp += ic->start_time;
        ret = avformat_seek_file(ic, -1, INT64_MIN, timestamp, INT64_MAX, 0);

Change History (2)

comment:1 by elite_jwp, 5 years ago

sorry, reference code is not at ffplay.c:2896 but at ffplay.c:2839

comment:2 by Balling, 21 months ago

Hi, is this still a problem?

Note: See TracTickets for help on using tickets.