video-frame: fix height/width assertions
authorTim-Philipp Müller <tim@centricular.com>
Wed, 18 Mar 2015 20:38:20 +0000 (20:38 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 18 Mar 2015 20:40:42 +0000 (20:40 +0000)
As commit 274984e8 states:
When doing CROP META it is expected that the width and/or height
in the GstVideoMeta is bigger or equal to the caps negotiated size.

https://bugzilla.gnome.org/show_bug.cgi?id=741030

gst-libs/gst/video/video-frame.c

index 19c1b0a..f05958c 100644 (file)
@@ -74,8 +74,8 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
   if (meta) {
     /* All these values must be consistent */
     g_return_val_if_fail (info->finfo->format == meta->format, FALSE);
-    g_return_val_if_fail (info->width >= meta->width, FALSE);
-    g_return_val_if_fail (info->height >= meta->height, FALSE);
+    g_return_val_if_fail (info->width <= meta->width, FALSE);
+    g_return_val_if_fail (info->height <= meta->height, FALSE);
     g_return_val_if_fail (info->finfo->n_planes == meta->n_planes, FALSE);
 
     frame->info.finfo = gst_video_format_get_info (meta->format);