diff options
Diffstat (limited to 'gst')
-rw-r--r-- | gst/compositor/compositor.c | 13 | ||||
-rw-r--r-- | gst/rawparse/gstrawvideoparse.c | 4 |
2 files changed, 11 insertions, 6 deletions
diff --git a/gst/compositor/compositor.c b/gst/compositor/compositor.c index 8a891f1fc..16012aa7e 100644 --- a/gst/compositor/compositor.c +++ b/gst/compositor/compositor.c @@ -1116,6 +1116,7 @@ _draw_background (GstCompositor * comp, GstVideoFrame * outframe, num_planes = GST_VIDEO_FRAME_N_PLANES (outframe); for (plane = 0; plane < num_planes; ++plane) { const GstVideoFormatInfo *info; + gint comp[GST_VIDEO_MAX_COMPONENTS]; guint8 *pdata; gsize rowsize, plane_stride; gint yoffset; @@ -1123,12 +1124,14 @@ _draw_background (GstCompositor * comp, GstVideoFrame * outframe, info = outframe->info.finfo; pdata = GST_VIDEO_FRAME_PLANE_DATA (outframe, plane); plane_stride = GST_VIDEO_FRAME_PLANE_STRIDE (outframe, plane); - rowsize = GST_VIDEO_FRAME_COMP_WIDTH (outframe, plane) - * GST_VIDEO_FRAME_COMP_PSTRIDE (outframe, plane); - height = - GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, plane, (y_end - y_start)); - yoffset = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, plane, y_start); + gst_video_format_info_component (info, plane, comp); + rowsize = GST_VIDEO_FRAME_COMP_WIDTH (outframe, comp[0]) + * GST_VIDEO_FRAME_COMP_PSTRIDE (outframe, comp[0]); + height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, comp[0], + (y_end - y_start)); + + yoffset = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info, comp[0], y_start); pdata += yoffset * plane_stride; for (i = 0; i < height; ++i) { diff --git a/gst/rawparse/gstrawvideoparse.c b/gst/rawparse/gstrawvideoparse.c index 066dd2aa7..fd1a993d6 100644 --- a/gst/rawparse/gstrawvideoparse.c +++ b/gst/rawparse/gstrawvideoparse.c @@ -1165,10 +1165,12 @@ gst_raw_video_parse_update_info (GstRawVideoParseConfig * config) gint tile_height = 1 << GST_VIDEO_FORMAT_INFO_TILE_HS (info->finfo); last_plane_size = x_tiles * y_tiles * tile_width * tile_height; } else { + gint comp[GST_VIDEO_MAX_COMPONENTS]; + gst_video_format_info_component (info->finfo, last_plane, comp); last_plane_size = GST_VIDEO_INFO_PLANE_STRIDE (info, last_plane) * GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info->finfo, - last_plane, config->height); + comp[0], config->height); } GST_VIDEO_INFO_SIZE (info) = last_plane_offset + last_plane_size; |