diff options
Diffstat (limited to 'libavfilter/defaults.c')
-rw-r--r-- | libavfilter/defaults.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index dabb1d5bf0..1983672cd6 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -32,7 +32,7 @@ void avfilter_default_free_video_buffer(AVFilterPic *pic) /* TODO: set the buffer's priv member to a context structure for the whole * filter chain. This will allow for a buffer pool instead of the constant * alloc & free cycle currently implemented. */ -AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms) +AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h) { AVFilterPic *pic = av_mallocz(sizeof(AVFilterPic)); AVFilterPicRef *ref = av_mallocz(sizeof(AVFilterPicRef)); @@ -40,8 +40,8 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms) char *buf; ref->pic = pic; - ref->w = pic->w = link->w; - ref->h = pic->h = link->h; + ref->w = pic->w = w; + ref->h = pic->h = h; /* make sure the buffer gets read permission or it's useless for output */ ref->perms = perms | AV_PERM_READ; @@ -72,7 +72,7 @@ void avfilter_default_start_frame(AVFilterLink *link, AVFilterPicRef *picref) out = link->dst->outputs[0]; if(out) { - out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE); + out->outpic = avfilter_get_video_buffer(out, AV_PERM_WRITE, link->w, link->h); out->outpic->pts = picref->pts; avfilter_start_frame(out, avfilter_ref_pic(out->outpic, ~0)); } |