Check error value in avpicture_get_size 88/62088/2 accepted/tizen/common/20160317.161558 accepted/tizen/ivi/20160318.113507 accepted/tizen/mobile/20160318.113233 accepted/tizen/tv/20160318.113346 accepted/tizen/wearable/20160318.113335 submit/tizen/20160317.105205
authorSeokHoon Lee <andy.shlee@samsung.com>
Mon, 14 Mar 2016 08:30:58 +0000 (17:30 +0900)
committerSeokHoon Lee <andy.shlee@samsung.com>
Mon, 14 Mar 2016 08:32:53 +0000 (17:32 +0900)
Signed-off-by: SeokHoon Lee <andy.shlee@samsung.com>
Change-Id: I1653c76b9173f6252cb719d1b23bb075996d3aa2

packaging/capi-media-vision.spec
test/testsuites/barcode/barcode_test_suite.c

index 7939216286dd2b66b8c0c923d66ef0ec6cc5b386..0695c26e6e8698e56fd4528dbe8258ccc586ade4 100644 (file)
@@ -1,6 +1,6 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.3.8
+Version:     0.3.9
 Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-2.0
index c7bcaecae69d084b2e51cd06850bb83c0f453731..6f03926f2e63ec418f45b41441b2f317c79b4c31 100644 (file)
@@ -118,13 +118,14 @@ int convert_rgb_to(unsigned char *src_buffer, unsigned char **dst_buffer,
                        src_picture.linesize, 0, image_data.image_height,
                        dst_picture.data, dst_picture.linesize);
 
-       *cvt_buffer_size = avpicture_get_size(pixel_format,
+       int picture_size = avpicture_get_size(pixel_format,
                        image_data.image_width, image_data.image_height);
-       if(*cvt_buffer_size < 0) {
+       if(picture_size < 0) {
                avpicture_free(&dst_picture);
                MEDIA_VISION_FUNCTION_LEAVE();
                return MEDIA_VISION_ERROR_OUT_OF_MEMORY;
        }
+       *cvt_buffer_size = (unsigned long)picture_size;
 
        (*dst_buffer) = (unsigned char*)malloc(*cvt_buffer_size);
        memcpy(*dst_buffer, dst_picture.data[0], *cvt_buffer_size);