]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_amix: do not leave unset PTS for frames after first stream is over
authorPaul B Mahol <onemda@gmail.com>
Sun, 13 Sep 2020 12:00:27 +0000 (14:00 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 14 Sep 2020 16:16:42 +0000 (18:16 +0200)
First stream is used only to get number of samples to put into each output frame.

libavfilter/af_amix.c

index cae9d4585ab49e6de2e4873e86962f7cc03bf72d..c4d8916a572a15e47587a5aefee28b03bf2e27dd 100644 (file)
@@ -309,6 +309,8 @@ static int output_frame(AVFilterLink *outlink)
                 }
             }
         }
+
+        s->next_pts = frame_list_next_pts(s->frame_list);
     } else {
         /* first input closed: use the available samples */
         nb_samples = INT_MAX;
@@ -324,7 +326,6 @@ static int output_frame(AVFilterLink *outlink)
         }
     }
 
-    s->next_pts = frame_list_next_pts(s->frame_list);
     frame_list_remove_samples(s->frame_list, nb_samples);
 
     calculate_scales(s, nb_samples);