diff options
Diffstat (limited to 'libavfilter/vsrc_color.c')
-rw-r--r-- | libavfilter/vsrc_color.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c index c17f54f39d..0fa6853189 100644 --- a/libavfilter/vsrc_color.c +++ b/libavfilter/vsrc_color.c @@ -142,13 +142,20 @@ static int color_request_frame(AVFilterLink *link) { ColorContext *color = link->src->priv; AVFilterBufferRef *picref = ff_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h); + AVFilterBufferRef *buf_out; int ret; picref->video->pixel_aspect = (AVRational) {1, 1}; picref->pts = color->pts++; picref->pos = -1; - ret = ff_start_frame(link, avfilter_ref_buffer(picref, ~0)); + buf_out = avfilter_ref_buffer(picref, ~0); + if (!buf_out) { + ret = AVERROR(ENOMEM); + goto fail; + } + + ret = ff_start_frame(link, buf_out); if (ret < 0) goto fail; |