[FFmpeg-devel] [PATCH 3/3] lavfi/af_astreamsync: check ff_all_samplerates() return.

Nicolas George george at nsup.org
Tue Oct 6 10:18:20 CEST 2015


Fix CID 1325679.

Signed-off-by: Nicolas George <george at nsup.org>
---
 libavfilter/af_astreamsync.c | 2 ++
 1 file changed, 2 insertions(+)


The way the formats and layouts are set look fishy, but I do not have time
to look into it right now. And this filter is not useful for users anyway.


diff --git a/libavfilter/af_astreamsync.c b/libavfilter/af_astreamsync.c
index becfe34..1e2778a 100644
--- a/libavfilter/af_astreamsync.c
+++ b/libavfilter/af_astreamsync.c
@@ -98,6 +98,8 @@ static int query_formats(AVFilterContext *ctx)
         ff_formats_ref(formats, &ctx->inputs[i]->out_formats);
         ff_formats_ref(formats, &ctx->outputs[i]->in_formats);
         rates = ff_all_samplerates();
+        if (!rates)
+            return AVERROR(ENOMEM);
         ff_formats_ref(rates, &ctx->inputs[i]->out_samplerates);
         ff_formats_ref(rates, &ctx->outputs[i]->in_samplerates);
         layouts = ctx->inputs[i]->in_channel_layouts;
-- 
2.5.3



More information about the ffmpeg-devel mailing list