Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/asrc_anullsrc.c')
-rw-r--r--libavfilter/asrc_anullsrc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 062aefcb2d..84260c3721 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -114,12 +114,17 @@ static int request_frame(AVFilterLink *outlink)
AVFrame *samplesref;
samplesref = ff_get_audio_buffer(outlink, null->nb_samples);
+ if (!samplesref)
+ return AVERROR(ENOMEM);
+
samplesref->pts = null->pts;
samplesref->channel_layout = null->channel_layout;
samplesref->sample_rate = outlink->sample_rate;
ret = ff_filter_frame(outlink, av_frame_clone(samplesref));
av_frame_free(&samplesref);
+ if (ret < 0)
+ return ret;
null->pts += null->nb_samples;
return ret;