]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/avfilter.c
Merge commit '5e992a4682d2c09eed3839c6cacf70db3b65c2f4'
[ffmpeg] / libavfilter / avfilter.c
index b5b3734944da7e1de5547b1d128e9b70916bbfca..7ce82f8011f95c2959b73b41fecccc701079a025 100644 (file)
@@ -1092,8 +1092,9 @@ static int ff_filter_frame_needs_framing(AVFilterLink *link, AVFrame *frame)
                 return 0;
             }
             av_frame_copy_props(pbuf, frame);
-            pbuf->pts = frame->pts +
-                        av_rescale_q(inpos, samples_tb, link->time_base);
+            pbuf->pts = frame->pts;
+            if (pbuf->pts != AV_NOPTS_VALUE)
+                pbuf->pts += av_rescale_q(inpos, samples_tb, link->time_base);
             pbuf->nb_samples = 0;
         }
         nb_samples = FFMIN(insamples,