lavfi/tile: do not leak input frame

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-08-22 20:31:22 +00:00
parent 0be3be9011
commit 8fbf940e16

View File

@ -172,8 +172,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
if (!tile->current) {
tile->out_ref = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!tile->out_ref)
if (!tile->out_ref) {
av_frame_free(&picref);
return AVERROR(ENOMEM);
}
av_frame_copy_props(tile->out_ref, picref);
tile->out_ref->width = outlink->w;
tile->out_ref->height = outlink->h;