[FFmpeg-cvslog] ffplay: use start_time as next audio pts on flush when seeking is not supported

Marton Balint git at videolan.org
Sat Jul 20 03:29:51 CEST 2013


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Jul 13 13:55:43 2013 +0200| [73b2043d727029ecde19c1d92bda8411f18b8e55] | committer: Marton Balint

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 at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=73b2043d727029ecde19c1d92bda8411f18b8e55
---

 ffplay.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffplay.c b/ffplay.c
index 6ed8a85..9b5dce0 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2333,6 +2333,8 @@ static int audio_decode_frame(VideoState *is)
             avcodec_flush_buffers(dec);
             is->audio_buf_frames_pending = 0;
             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;



More information about the ffmpeg-cvslog mailing list