1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/copy: add forgotten check

This commit is contained in:
Paul B Mahol 2019-10-01 14:55:43 +02:00
parent 9cee8975c3
commit 94b155e49b
2 changed files with 6 additions and 2 deletions

View File

@ -26,8 +26,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFrame *out = ff_get_audio_buffer(outlink, in->nb_samples);
int ret;
if (!out)
if (!out) {
ret = AVERROR(ENOMEM);
goto fail;
}
ret = av_frame_copy_props(out, in);
if (ret < 0)

View File

@ -50,8 +50,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFrame *out = ff_get_video_buffer(outlink, in->width, in->height);
int ret;
if (!out)
if (!out) {
ret = AVERROR(ENOMEM);
goto fail;
}
ret = av_frame_copy_props(out, in);
if (ret < 0)