From 9583d1bfc9d4a249c6c1d5b82432cefec269bc9b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 20 Aug 2012 11:12:31 +0200 Subject: [PATCH 1/1] video-info: update padding Update the alignement structure with the new padding values because they could have been changed when the padding was increased to align the strides. --- gst-libs/gst/video/video-info.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c index 6378a4b..e5c43d9 100644 --- a/gst-libs/gst/video/video-info.c +++ b/gst-libs/gst/video/video-info.c @@ -675,7 +675,7 @@ done: * stride alignment in @align is respected. * * Extra padding will be added to the right side when stride alignment padding - * is required. + * is required and @align will be updated with the new padding values. */ void gst_video_info_align (GstVideoInfo * info, GstVideoAlignment * align) @@ -718,6 +718,8 @@ gst_video_info_align (GstVideoInfo * info, GstVideoAlignment * align) padded_width += padded_width & ~(padded_width - 1); } while (!aligned); + align->padding_right = padded_width - width - align->padding_left; + info->width = width; info->height = height; -- 2.7.4