Fix chroma stride for I420 stride/crop conversion

This commit is contained in:
Sebastian Dröge 2012-09-17 12:24:30 +02:00
parent 7dbef6415f
commit bc7d2006e3

View file

@ -712,12 +712,17 @@ gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, gint idx,
/* Same video format */
if (buffer_info->size == GST_BUFFER_SIZE (outbuf)) {
GST_DEBUG_OBJECT (self, "Buffer sizes equal, doing fast copy");
memcpy (GST_BUFFER_DATA (outbuf), buf->data + buffer_info->offset,
buffer_info->size);
ret = TRUE;
goto done;
}
GST_DEBUG_OBJECT (self,
"Sizes not equal (%d vs %d), doing slow line-by-line copying",
buffer_info->size, GST_BUFFER_SIZE (outbuf));
/* Different video format, try to convert */
switch (self->color_format) {
case COLOR_FormatYUV420Planar:{
@ -736,7 +741,6 @@ gst_amc_video_dec_fill_buffer (GstAmcVideoDec * self, gint idx,
dest_stride = GST_VIDEO_INFO_COMP_STRIDE (info, i);
} else {
src_stride = self->stride / 2;
src_stride = GST_ROUND_UP_16 (src_stride);
dest_stride = GST_VIDEO_INFO_COMP_STRIDE (info, i);
}