lavfi/showwaves: return error in case of allocation failure in filter_samples()

This commit is contained in:
Stefano Sabatini 2012-11-06 22:48:54 +01:00
parent 5f634480d1
commit b5436f4b5d

View File

@ -199,6 +199,8 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
showwaves->outpicref = outpicref =
ff_get_video_buffer(outlink, AV_PERM_WRITE|AV_PERM_ALIGN,
outlink->w, outlink->h);
if (!outpicref)
return AVERROR(ENOMEM);
outpicref->video->w = outlink->w;
outpicref->video->h = outlink->h;
outpicref->pts = insamples->pts +