video-info: Also check the stride and offset are equal
gst_video_info_is_equal() was not checking if stride and offset had changed. https://bugzilla.gnome.org/show_bug.cgi?id=729896
This commit is contained in:
parent
ec95963b1f
commit
e0cfd6e26b
@ -280,6 +280,8 @@ no_height:
|
|||||||
gboolean
|
gboolean
|
||||||
gst_video_info_is_equal (const GstVideoInfo * info, const GstVideoInfo * other)
|
gst_video_info_is_equal (const GstVideoInfo * info, const GstVideoInfo * other)
|
||||||
{
|
{
|
||||||
|
gint i;
|
||||||
|
|
||||||
if (GST_VIDEO_INFO_FORMAT (info) != GST_VIDEO_INFO_FORMAT (other))
|
if (GST_VIDEO_INFO_FORMAT (info) != GST_VIDEO_INFO_FORMAT (other))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (GST_VIDEO_INFO_INTERLACE_MODE (info) !=
|
if (GST_VIDEO_INFO_INTERLACE_MODE (info) !=
|
||||||
@ -301,6 +303,14 @@ gst_video_info_is_equal (const GstVideoInfo * info, const GstVideoInfo * other)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (GST_VIDEO_INFO_FPS_D (info) != GST_VIDEO_INFO_FPS_D (other))
|
if (GST_VIDEO_INFO_FPS_D (info) != GST_VIDEO_INFO_FPS_D (other))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
for (i = 0; i < info->finfo->n_planes; i++) {
|
||||||
|
if (info->stride[i] != other->stride[i])
|
||||||
|
return FALSE;
|
||||||
|
if (info->offset[i] != other->offset[i])
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user