Commit 78e8b33c authored by Thiago Santos's avatar Thiago Santos
Browse files

video: Getting component offsets without dimensions is fine if it is not YUV

This fixes a regression that an assertion would happen if
gst_video_get_component_offset would be called with width or
height as 0.

Calling it with 0 is fine if the format isn't yuv and this
was already being used in some other places of video.c
parent 2ab592ba
......@@ -1730,7 +1730,8 @@ gst_video_format_get_component_offset (GstVideoFormat format,
{
g_return_val_if_fail (format != GST_VIDEO_FORMAT_UNKNOWN, 0);
g_return_val_if_fail (component >= 0 && component <= 3, 0);
g_return_val_if_fail (width > 0 && height > 0, 0);
g_return_val_if_fail ((!gst_video_format_is_yuv (format)) || (width > 0
&& height > 0), 0);
switch (format) {
case GST_VIDEO_FORMAT_I420:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment