update prevent issue issue 19/34719/1
authorYoungHun Kim <yh8004.kim@samsung.com>
Mon, 2 Feb 2015 02:09:49 +0000 (11:09 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Mon, 2 Feb 2015 02:09:50 +0000 (11:09 +0900)
Change-Id: I818f1441929df2246033243722b73cef0417f899
Signed-off-by: YoungHun Kim <yh8004.kim@samsung.com>
configure.ac
gstcs/Makefile.am
gstcs/mm_util_gstcs.c
packaging/libmm-imgp-gstcs.spec

index 4a5e392..7b8bf90 100755 (executable)
@@ -43,18 +43,26 @@ PKG_CHECK_MODULES(GLIB, glib-2.0)
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
-PKG_CHECK_MODULES(GST, gstreamer-1.0)
+PKG_CHECK_MODULES(GST, gstreamer-1.0 >= 1.2.0)
 AC_SUBST(GST_CFLAGS)
 AC_SUBST(GST_LIBS)
 
-PKG_CHECK_MODULES(GSTAPP, gstreamer-app-1.0)
-AC_SUBST(GSTAPP_CFLAGS)
-AC_SUBST(GSTAPP_LIBS)
-
 PKG_CHECK_MODULES(GMODULE, gmodule-2.0)
 AC_SUBST(GMODULE_CFLAGS)
 AC_SUBST(GMODULE_LIBS)
 
+PKG_CHECK_MODULES(GSTAPP, gstreamer-app-1.0 >= 1.2.0)
+AC_SUBST(GSTAPP_CFLAGS)
+AC_SUBST(GSTAPP_LIBS)
+
+PKG_CHECK_MODULES(GST_VIDEO, gstreamer-video-1.0 >= 1.2.0)
+AC_SUBST(GST_VIDEO_CFLAGS)
+AC_SUBST(GST_VIDEO_LIBS)
+
+PKG_CHECK_MODULES(GSTPBUTILS, gstreamer-pbutils-1.0 >= 1.2.0)
+AC_SUBST(GSTPBUTILS_CFLAGS)
+AC_SUBST(GSTPBUTILS_LIBS)
+
 AC_CONFIG_FILES([Makefile
                 gstcs/Makefile
                  gstcs/mmutil-gstcs.pc
index 154d324..dda9be1 100755 (executable)
@@ -13,10 +13,17 @@ libmmutil_imgp_gstcs_la_CFLAGS = -I$(srcdir)/include \
                             $(GLIB_CFLAGS) \
                             $(GST_CFLAGS) \
                             $(GSTAPP_CFLAGS)  \
+                             $(GST_PLUGIN_BASE_CFLAGS) \
+                             $(GST_INTERFACE_CFLAGS) \
+                             $(GSTPBUTILS_CFLAGS) \
                              $(MMLOG_CFLAGS) -DMMF_LOG_OWNER=0x0100 -DMMF_DEBUG_PREFIX=\"MMF-IMAGE\"
 
 libmmutil_imgp_gstcs_la_LIBADD = $(MMCOMMON_LIBS) \
                            $(GLIB_LIBS) \
                            $(GST_LIBS) \
                            $(GSTAPP_LIBS) \
+                            $(GST_VIDEO_LIBS) \
+                            $(GST_PLUGIN_BASE_LIBS) \
+                            $(GST_INTERFACE_LIBS) \
+                            $(GSTPBUTILS_LIBS) \
                            $(MMLOG_LIBS)
index 0b524ec..0353a3a 100644 (file)
@@ -426,6 +426,7 @@ _mm_set_input_image_format_s_struct(imgp_info_s* pImgp_info) /* char* __format_l
        image_format_s* __format = NULL;
 
        __format=(image_format_s*)malloc(sizeof(image_format_s));
+       memset(__format, 0, sizeof(image_format_s));
 
        __format->format_label = (char *)malloc(sizeof(char) * IMAGE_FORMAT_LABEL_BUFFER_SIZE);
        memset(__format->format_label, 0, IMAGE_FORMAT_LABEL_BUFFER_SIZE);
@@ -461,6 +462,7 @@ _mm_set_output_image_format_s_struct(imgp_info_s* pImgp_info)
        image_format_s* __format = NULL;
 
        __format=(image_format_s*)malloc(sizeof(image_format_s));
+       memset(__format, 0, sizeof(image_format_s));
 
        __format->format_label = (char *)malloc(sizeof(char) * IMAGE_FORMAT_LABEL_BUFFER_SIZE);
        memset(__format->format_label, 0, IMAGE_FORMAT_LABEL_BUFFER_SIZE);
@@ -633,6 +635,7 @@ _mm_imgp_gstcs_processing( gstreamer_s* pGstreamer_s, image_format_s* input_form
                        }
                }
                gst_object_unref (pGstreamer_s->pipeline);
+               g_free(GST_BUFFER_MALLOCDATA(pGstreamer_s->output_buffer));
                pGstreamer_s->output_buffer = NULL;
                g_free (pGstreamer_s);
 
@@ -710,8 +713,8 @@ _mm_imgp_gstcs(imgp_info_s* pImgp_info)
        input_format= _mm_set_input_image_format_s_struct(pImgp_info);
        output_format= _mm_set_output_image_format_s_struct(pImgp_info);
 
-       pImgp_info->output_stride = output_format->stride;
-       pImgp_info->output_elevation = output_format->elevation;
+       pImgp_info->output_stride = output_format->width;
+       pImgp_info->output_elevation = output_format->height;
 
        debug_log("mm_check_resize_format&&mm_check_rotate_format ");
 
@@ -756,7 +759,7 @@ _mm_imgp_gstcs(imgp_info_s* pImgp_info)
                }else if (ret != MM_ERROR_NONE) {
                        debug_error("ERROR - mm_convert_colorspace");
                }
-       }else {
+       } else {
                debug_error("Error - Check your input / ouput image input_format_label: %s src_width: %d src_height: %d output_format_label: %s output_stride: %d output_elevation: %d angle: %d ",
                pImgp_info->input_format_label, pImgp_info->src_width, pImgp_info->src_height, pImgp_info->output_format_label, pImgp_info->output_stride, pImgp_info->output_elevation, pImgp_info->angle);
                ret = MM_ERROR_IMAGE_INVALID_VALUE;
index 1d29955..19748b0 100644 (file)
@@ -2,7 +2,7 @@
 Name:       libmm-imgp-gstcs
 Summary:    Multimedia Framework Utility Library
 Version:    0.4
-Release:    14
+Release:    15
 Group:      System/Libraries
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
@@ -11,8 +11,11 @@ BuildRequires:  pkgconfig(mm-common)
 BuildRequires:  pkgconfig(mm-log)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gstreamer-1.0)
-BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
 BuildRequires:  pkgconfig(gmodule-2.0)
+BuildRequires:  pkgconfig(gstreamer-app-1.0)
+BuildRequires:  pkgconfig(gstreamer-video-1.0)
+BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
+BuildRequires:  pkgconfig(gstreamer-pbutils-1.0)
 
 
 %description