Commit 1dbc3e8a authored by Derek Buitenhuis's avatar Derek Buitenhuis

avfilter/aresample: Check for memory alloc failure for out sample rates

Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent 81cee700
......@@ -103,6 +103,11 @@ static int query_formats(AVFilterContext *ctx)
} else {
out_samplerates = ff_all_samplerates();
}
if (!out_samplerates) {
av_log(ctx, AV_LOG_ERROR, "Cannot allocate output samplerates.\n");
return AVERROR(ENOMEM);
}
ff_formats_ref(out_samplerates, &outlink->in_samplerates);
if(out_format != AV_SAMPLE_FMT_NONE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment