[FFmpeg-cvslog] asyncts: ignore min_delta only if first_pts is set

Justin Ruggles git at videolan.org
Fri Dec 14 15:57:47 CET 2012


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Thu Dec 13 18:30:20 2012 -0500| [4e5a8878d583d3d70d8a01e9f73640b8cdb38c41] | committer: Justin Ruggles

asyncts: ignore min_delta only if first_pts is set

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

 libavfilter/af_asyncts.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index d6d8932..40680c8 100644
--- a/libavfilter/af_asyncts.c
+++ b/libavfilter/af_asyncts.c
@@ -215,7 +215,8 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
     delta    = pts - s->pts - get_delay(s);
     out_size = avresample_available(s->avr);
 
-    if (labs(delta) > s->min_delta || (s->first_frame && delta)) {
+    if (labs(delta) > s->min_delta ||
+        (s->first_frame && delta && s->first_pts != AV_NOPTS_VALUE)) {
         av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
         out_size = av_clipl_int32((int64_t)out_size + delta);
     } else {



More information about the ffmpeg-cvslog mailing list