From d6439e09d87e924bd72d488b6c2e749c76b54b9f Mon Sep 17 00:00:00 2001 From: stefano Date: Wed, 7 Oct 2009 18:50:00 +0000 Subject: [PATCH] Add w and h fields to AVFilterPic. See the thread: "[FFmpeg-devel] [PATCH] Add w,h fields to AVFilterPic". git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20189 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- libavfilter/avfilter.h | 4 +++- libavfilter/defaults.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index a41ece4ea..9c282e278 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -24,7 +24,7 @@ #define LIBAVFILTER_VERSION_MAJOR 0 #define LIBAVFILTER_VERSION_MINOR 5 -#define LIBAVFILTER_VERSION_MICRO 0 +#define LIBAVFILTER_VERSION_MICRO 1 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ LIBAVFILTER_VERSION_MINOR, \ @@ -71,6 +71,8 @@ typedef struct AVFilterPic * reallocating it from scratch. */ void (*free)(struct AVFilterPic *pic); + + int w, h; ///< width and height of the allocated buffer } AVFilterPic; /** diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index 7c20a08f3..dabb1d5bf 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -40,8 +40,8 @@ AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms) char *buf; ref->pic = pic; - ref->w = link->w; - ref->h = link->h; + ref->w = pic->w = link->w; + ref->h = pic->h = link->h; /* make sure the buffer gets read permission or it's useless for output */ ref->perms = perms | AV_PERM_READ; -- 2.11.4.GIT