[0.6.183] Fix bug that calculates the stream elevation value 10/203810/1
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 18 Apr 2019 01:49:31 +0000 (10:49 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 18 Apr 2019 01:49:35 +0000 (10:49 +0900)
Change-Id: Ie1f3ae24ea17e9ee5339a5319417cf964aa68573

packaging/libmm-player.spec
src/mm_player_priv.c

index a2d48f3..855c6ae 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-player
 Summary:    Multimedia Framework Player Library
-Version:    0.6.182
+Version:    0.6.183
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 8b97b92..4f65f40 100644 (file)
@@ -9208,6 +9208,7 @@ static void
 __mmplayer_zerocopy_set_stride_elevation_bo(mmplayer_video_decoded_data_info_t *stream, GstMemory *mem)
 {
        unsigned int pitch = 0;
+       unsigned int size = 0;
        int index = 0;
        tbm_surface_h surface = gst_tizen_memory_get_surface(mem);
        tbm_bo bo = NULL;
@@ -9221,9 +9222,12 @@ __mmplayer_zerocopy_set_stride_elevation_bo(mmplayer_video_decoded_data_info_t *
        }
 
        for (index = 0; index < stream->plane_num; index++) {
-               tbm_surface_internal_get_plane_data(surface, index, NULL, NULL, &pitch);
+               tbm_surface_internal_get_plane_data(surface, index, &size, NULL, &pitch);
                stream->stride[index] = pitch;
-               stream->elevation[index] = stream->height;
+               if (pitch)
+                       stream->elevation[index] = size / pitch;
+               else
+                       stream->elevation[index] = stream->height;
        }
 }