From 1c35920d85e424b3f65aa6df1dbde689dd6ec007 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Wed, 25 Mar 2015 10:47:45 +0900 Subject: commit BSP v1.8.0 Signed-off-by: Nobuhiro Iwamatsu --- ...dd-tests-to-determine-if-width-and-height.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 common/recipes-multimedia/gstreamer/gst-plugins-good/0012-videocrop-add-tests-to-determine-if-width-and-height.patch (limited to 'common/recipes-multimedia/gstreamer/gst-plugins-good/0012-videocrop-add-tests-to-determine-if-width-and-height.patch') diff --git a/common/recipes-multimedia/gstreamer/gst-plugins-good/0012-videocrop-add-tests-to-determine-if-width-and-height.patch b/common/recipes-multimedia/gstreamer/gst-plugins-good/0012-videocrop-add-tests-to-determine-if-width-and-height.patch new file mode 100644 index 0000000..5712fdf --- /dev/null +++ b/common/recipes-multimedia/gstreamer/gst-plugins-good/0012-videocrop-add-tests-to-determine-if-width-and-height.patch @@ -0,0 +1,39 @@ +From 93c3d86c39fceb5a9dd6b390627da5090ee171dd Mon Sep 17 00:00:00 2001 +From: Kazunori Kobayashi +Date: Thu, 4 Oct 2012 10:33:03 +0900 +Subject: [PATCH 12/31] videocrop: add tests to determine if width and height + caps hold range value before getting image details + +This check is necessary because gst_video_crop_get_image_details_from_structure() +can't be performed when caps contain range value. +--- + gst/videocrop/gstvideocrop.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c +index 6af348a..059b11a 100644 +--- a/gst/videocrop/gstvideocrop.c ++++ b/gst/videocrop/gstvideocrop.c +@@ -637,11 +637,14 @@ gst_video_crop_transform_caps (GstBaseTransform * trans, + GstVideoCropImageDetails img_details = { 0, }; + GValue stride = { 0, }; + +- gst_video_crop_get_image_details_from_structure (vcrop, &img_details, +- structure); +- g_value_init (&stride, G_TYPE_INT); +- g_value_set_int (&stride, (gint) img_details.stride); +- gst_structure_set_value (new_structure, "rowstride", &stride); ++ if (!GST_VALUE_HOLDS_INT_RANGE (&w_val) && ++ !GST_VALUE_HOLDS_INT_RANGE (&h_val) && ++ gst_video_crop_get_image_details_from_structure (vcrop, &img_details, ++ structure)) { ++ g_value_init (&stride, G_TYPE_INT); ++ g_value_set_int (&stride, (gint) img_details.stride); ++ gst_structure_set_value (new_structure, "rowstride", &stride); ++ } + } + g_value_unset (&w_val); + g_value_unset (&h_val); +-- +1.7.9.5 + -- cgit 1.2.3-korg