diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 104a3b49561ea14f0dfba128411eeb3a17ddff5a..ebb216518459a83cbc851625226516ef80554f24 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -283,15 +283,15 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int if (!(picref->video = av_mallocz(sizeof(AVFilterBufferRefVideoProps)))) goto fail; - picref->video->w = w; - picref->video->h = h; + pic->w = picref->video->w = w; + pic->h = picref->video->h = h; /* make sure the buffer gets read permission or it's useless for output */ picref->perms = perms | AV_PERM_READ; pic->refcount = 1; picref->type = AVMEDIA_TYPE_VIDEO; - picref->format = format; + pic->format = picref->format = format; memcpy(pic->data, data, sizeof(pic->data)); memcpy(pic->linesize, linesize, sizeof(pic->linesize)); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 02b513fb7521963db1624d6fcb587e04124ddc0c..597e7a71d0bfab54969af415d6b5986a78a25220 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -27,7 +27,7 @@ #include "libavcore/samplefmt.h" #define LIBAVFILTER_VERSION_MAJOR 1 -#define LIBAVFILTER_VERSION_MINOR 72 +#define LIBAVFILTER_VERSION_MINOR 73 #define LIBAVFILTER_VERSION_MICRO 0 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ @@ -80,6 +80,9 @@ typedef struct AVFilterBuffer { * reallocating it from scratch. */ void (*free)(struct AVFilterBuffer *buf); + + int format; ///< media format + int w, h; ///< width and height of the allocated buffer } AVFilterBuffer; #define AV_PERM_READ 0x01 ///< can read from the buffer