You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
ffplay: use start_time as next audio pts on flush when seeking is not supported
Theoretically using start_time should also work if seeking is available and we could determine that the next packet after a flush packet is the first packet of a stream, but I could not think of an easy and clean way to do that, that is why I sticked to the no seeking available condition for now. Fixes ticket #2647. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
2
ffplay.c
2
ffplay.c
@@ -2333,6 +2333,8 @@ static int audio_decode_frame(VideoState *is)
|
|||||||
avcodec_flush_buffers(dec);
|
avcodec_flush_buffers(dec);
|
||||||
is->audio_buf_frames_pending = 0;
|
is->audio_buf_frames_pending = 0;
|
||||||
is->audio_frame_next_pts = AV_NOPTS_VALUE;
|
is->audio_frame_next_pts = AV_NOPTS_VALUE;
|
||||||
|
if ((is->ic->iformat->flags & (AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK)) && !is->ic->iformat->read_seek)
|
||||||
|
is->audio_frame_next_pts = is->audio_st->start_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
*pkt_temp = *pkt;
|
*pkt_temp = *pkt;
|
||||||
|
Reference in New Issue
Block a user