aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-12-13 18:30:20 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-12-13 18:51:56 -0500
commit4e5a8878d583d3d70d8a01e9f73640b8cdb38c41 (patch)
tree3f0ac5244a44698402b890b5e9f558f05cf8dc61
parentc0dc57f1264dad1e121772d03abdb9e14ed8857f (diff)
downloadffmpeg-4e5a8878d583d3d70d8a01e9f73640b8cdb38c41.tar.gz
asyncts: ignore min_delta only if first_pts is set
-rw-r--r--libavfilter/af_asyncts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index d6d893210c..40680c8559 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 {