[FFmpeg-cvslog] r26314 - in trunk/libavfilter: avfilter.c avfilter.h
michael
subversion
Wed Jan 12 00:53:17 CET 2011
Author: michael
Date: Wed Jan 12 00:53:17 2011
New Revision: 26314
Log:
Add w,h,format back into AVFilterBuffer, these are required for direct rendering.
These fields are needed to be able to know which area of memory is allocated and
which is off limits.
This reverts 24291 and parts of r24424.
Modified:
trunk/libavfilter/avfilter.c
trunk/libavfilter/avfilter.h
Modified: trunk/libavfilter/avfilter.c
==============================================================================
--- trunk/libavfilter/avfilter.c Tue Jan 11 22:16:00 2011 (r26313)
+++ trunk/libavfilter/avfilter.c Wed Jan 12 00:53:17 2011 (r26314)
@@ -283,15 +283,15 @@ avfilter_get_video_buffer_ref_from_array
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));
Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h Tue Jan 11 22:16:00 2011 (r26313)
+++ trunk/libavfilter/avfilter.h Wed Jan 12 00:53:17 2011 (r26314)
@@ -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
More information about the ffmpeg-cvslog
mailing list