[FFmpeg-cvslog] asyncts: merge two conditions

Justin Ruggles git at videolan.org
Fri Dec 14 15:50:18 CET 2012


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

asyncts: merge two conditions

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

 libavfilter/af_asyncts.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index faefdf4..d6d8932 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))



More information about the ffmpeg-cvslog mailing list