diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-12-13 13:20:51 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-12-13 18:51:56 -0500 |
commit | c0dc57f1264dad1e121772d03abdb9e14ed8857f (patch) | |
tree | 875352af689a229fe2c46a662e6a773083026e30 /libavfilter/af_asyncts.c | |
parent | 0995ad8db4bca55569f8f34ef6ac10552daeae13 (diff) | |
download | ffmpeg-c0dc57f1264dad1e121772d03abdb9e14ed8857f.tar.gz |
asyncts: merge two conditions
Diffstat (limited to 'libavfilter/af_asyncts.c')
-rw-r--r-- | libavfilter/af_asyncts.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c index faefdf4be7..d6d893210c 100644 --- a/libavfilter/af_asyncts.c +++ b/libavfilter/af_asyncts.c @@ -196,19 +196,14 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf) int out_size, ret; int64_t delta; - /* buffer data until we get the first timestamp */ - if (s->pts == AV_NOPTS_VALUE) { + /* buffer data until we get the next timestamp */ + if (s->pts == AV_NOPTS_VALUE || pts == AV_NOPTS_VALUE) { if (pts != AV_NOPTS_VALUE) { s->pts = pts - get_delay(s); } return write_to_fifo(s, buf); } - /* now wait for the next timestamp */ - if (pts == AV_NOPTS_VALUE) { - return write_to_fifo(s, buf); - } - if (s->first_pts != AV_NOPTS_VALUE) { handle_trimming(ctx); if (!avresample_available(s->avr)) |