return FALSE;
}
- if (!gst_amc_format_get_int (format, "stride", &stride, &err) ||
- !gst_amc_format_get_int (format, "slice-height", &slice_height, &err)) {
- GST_ERROR_OBJECT (self, "Failed to get stride and slice-height: %s",
- err->message);
- g_clear_error (&err);
- return FALSE;
- }
-
if (gst_amc_format_get_int (format, "crop-left", &crop_left, NULL) &&
gst_amc_format_get_int (format, "crop-right", &crop_right, NULL)) {
width = crop_right + 1 - crop_left;
goto out;
}
+ if (!gst_amc_format_get_int (format, "stride", &stride, &err) ||
+ !gst_amc_format_get_int (format, "slice-height", &slice_height, &err)) {
+ GST_ERROR_OBJECT (self, "Failed to get stride and slice-height: %s",
+ err->message);
+ g_clear_error (&err);
+ return FALSE;
+ }
+
self->format = gst_format;
self->width = width;
self->height = height;