[FFmpeg-cvslog] r24773 - in trunk: ffplay.c libavfilter/avfilter.h libavfilter/defaults.c libavfilter/vsrc_buffer.c
stefano
subversion
Wed Aug 11 17:25:42 CEST 2010
Author: stefano
Date: Wed Aug 11 17:25:42 2010
New Revision: 24773
Log:
Resize data and linesize in AVFilterBufferRef to 8.
This is required to make AVFilterBufferRef able to contain also audio
data, required by audio filtering integration.
Patch by S.N. Hemanth Meenakshisundaram smeen?ks at ucsd.ed?.
Modified:
trunk/ffplay.c
trunk/libavfilter/avfilter.h
trunk/libavfilter/defaults.c
trunk/libavfilter/vsrc_buffer.c
Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c Wed Aug 11 16:49:41 2010 (r24772)
+++ trunk/ffplay.c Wed Aug 11 17:25:42 2010 (r24773)
@@ -1670,8 +1670,9 @@ static int input_request_frame(AVFilterL
picref = avfilter_ref_buffer(priv->frame->opaque, ~0);
} else {
picref = avfilter_get_video_buffer(link, AV_PERM_WRITE, link->w, link->h);
- av_picture_copy((AVPicture *)&picref->data, (AVPicture *)priv->frame,
- picref->format, link->w, link->h);
+ av_picture_data_copy(picref->data, picref->linesize,
+ priv->frame->data, priv->frame->linesize,
+ picref->format, link->w, link->h);
}
av_free_packet(&pkt);
Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h Wed Aug 11 16:49:41 2010 (r24772)
+++ trunk/libavfilter/avfilter.h Wed Aug 11 17:25:42 2010 (r24773)
@@ -25,7 +25,7 @@
#include "libavutil/avutil.h"
#define LIBAVFILTER_VERSION_MAJOR 1
-#define LIBAVFILTER_VERSION_MINOR 33
+#define LIBAVFILTER_VERSION_MINOR 34
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
@@ -113,8 +113,8 @@ typedef struct AVFilterBufferRefVideoPro
typedef struct AVFilterBufferRef
{
AVFilterBuffer *buf; ///< the buffer that this is a reference to
- uint8_t *data[4]; ///< picture data for each plane
- int linesize[4]; ///< number of bytes per line
+ uint8_t *data[8]; ///< picture data for each plane
+ int linesize[8]; ///< number of bytes per line
int format; ///< media format
int64_t pts; ///< presentation timestamp in units of 1/AV_TIME_BASE
Modified: trunk/libavfilter/defaults.c
==============================================================================
--- trunk/libavfilter/defaults.c Wed Aug 11 16:49:41 2010 (r24772)
+++ trunk/libavfilter/defaults.c Wed Aug 11 17:25:42 2010 (r24773)
@@ -60,8 +60,8 @@ AVFilterBufferRef *avfilter_default_get_
// SIMD-friendly
av_fill_image_pointers(pic->data, ref->format, ref->video->h, buf, pic->linesize);
- memcpy(ref->data, pic->data, 4*sizeof(pic->data[0]));
- memcpy(ref->linesize, pic->linesize, 4*sizeof(pic->linesize[0]));
+ memcpy(ref->data, pic->data, sizeof(ref->data));
+ memcpy(ref->linesize, pic->linesize, sizeof(ref->linesize));
return ref;
}
Modified: trunk/libavfilter/vsrc_buffer.c
==============================================================================
--- trunk/libavfilter/vsrc_buffer.c Wed Aug 11 16:49:41 2010 (r24772)
+++ trunk/libavfilter/vsrc_buffer.c Wed Aug 11 17:25:42 2010 (r24773)
@@ -119,8 +119,9 @@ static int request_frame(AVFilterLink *l
AV_PERM_REUSE2,
link->w, link->h);
- av_picture_copy((AVPicture *)&picref->data, (AVPicture *)&c->frame,
- picref->format, link->w, link->h);
+ av_picture_data_copy(picref->data, picref->linesize,
+ c->frame.data, c->frame.linesize,
+ picref->format, link->w, link->h);
picref->pts = c->pts;
picref->video->pixel_aspect = c->pixel_aspect;
More information about the ffmpeg-cvslog
mailing list