Commit 8a78fc5b authored by Burt P's avatar Burt P

af_hdcd: check return value of av_frame_copy_props()

Anton Khirnov:
"[av_frame_copy_props()] potentially contains memory allocation,
so the return value needs to be checked."
Signed-off-by: 's avatarBurt P <pburt0@gmail.com>
parent 0cfe6acb
......@@ -1530,14 +1530,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFrame *out;
const int16_t *in_data;
int32_t *out_data;
int n, c;
int n, c, result;
out = ff_get_audio_buffer(outlink, in->nb_samples);
if (!out) {
av_frame_free(&in);
return AVERROR(ENOMEM);
}
av_frame_copy_props(out, in);
result = av_frame_copy_props(out, in);
if (result) {
av_frame_free(&in);
return result;
}
out->format = outlink->format;
in_data = (int16_t*)in->data[0];
......
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