diff options
author | Burt P <pburt0@gmail.com> | 2016-08-22 17:14:49 -0500 |
---|---|---|
committer | Burt P <pburt0@gmail.com> | 2016-08-24 09:08:45 -0500 |
commit | 8a78fc5b015f34e0a0c877b4b22b33fb961f847b (patch) | |
tree | a9aeb60d54ba9884d4cea381d043b124d5abd6ed /libavfilter/af_hdcd.c | |
parent | 0cfe6acbe4987b3ce8ec364408256a09895a1f9b (diff) | |
download | ffmpeg-8a78fc5b015f34e0a0c877b4b22b33fb961f847b.tar.gz |
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: Burt P <pburt0@gmail.com>
Diffstat (limited to 'libavfilter/af_hdcd.c')
-rw-r--r-- | libavfilter/af_hdcd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c index 1bcd279141..2324dc3426 100644 --- a/libavfilter/af_hdcd.c +++ b/libavfilter/af_hdcd.c @@ -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]; |