diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-09-13 13:25:05 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-09-13 13:26:11 +0200 |
commit | 55af1807f7606225616e0a64a2142aa560232887 (patch) | |
tree | ac99533c5947a27f996b2ac41998bfe10adb193d /libavfilter/asrc_anullsrc.c | |
parent | c28b14eb98dabcad17df90b6ed3d8ac79d09e035 (diff) | |
download | ffmpeg-55af1807f7606225616e0a64a2142aa560232887.tar.gz |
avfilter/asrc_anullsrc: actually return correct EOF pts
Diffstat (limited to 'libavfilter/asrc_anullsrc.c')
-rw-r--r-- | libavfilter/asrc_anullsrc.c | 9 |
1 files 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; |