1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

asyncts: ignore min_delta only if first_pts is set

This commit is contained in:
Justin Ruggles 2012-12-13 18:30:20 -05:00
parent c0dc57f126
commit 4e5a8878d5

View File

@ -215,7 +215,8 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
delta = pts - s->pts - get_delay(s); delta = pts - s->pts - get_delay(s);
out_size = avresample_available(s->avr); 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); av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
out_size = av_clipl_int32((int64_t)out_size + delta); out_size = av_clipl_int32((int64_t)out_size + delta);
} else { } else {