mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
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
This commit is contained in:
parent
2ab592bac9
commit
78e8b33c38
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue