[FFmpeg-cvslog] avfilter/asrc_anullsrc: actually return correct EOF pts

Paul B Mahol git at videolan.org
Sun Sep 13 14:27:44 EEST 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Sep 13 13:25:05 2020 +0200| [55af1807f7606225616e0a64a2142aa560232887] | committer: Paul B Mahol

avfilter/asrc_anullsrc: actually return correct EOF pts

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

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

diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index dabdb43f18..f2c0799faa 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -115,19 +115,14 @@ static int activate(AVFilterContext *ctx)
 
     if (ff_outlink_frame_wanted(outlink)) {
         AVFrame *samplesref = ff_get_audio_buffer(outlink, null->duration >= 0 ? FFMIN(null->nb_samples, null->duration - null->pts) : null->nb_samples);
-        int ret;
 
         if (!samplesref)
             return AVERROR(ENOMEM);
 
         samplesref->pts = null->pts;
+        null->pts += samplesref->nb_samples;
 
-        ret = ff_filter_frame(outlink, samplesref);
-        if (ret < 0)
-            return ret;
-
-        null->pts += null->nb_samples;
-        return 0;
+        return ff_filter_frame(outlink, samplesref);
     }
 
     return FFERROR_NOT_READY;



More information about the ffmpeg-cvslog mailing list