fix prevent issue #453398 16/44716/1
authorHyunil Park <hyunil46.park@samsung.com>
Mon, 27 Jul 2015 05:16:22 +0000 (14:16 +0900)
committerHyunil Park <hyunil46.park@samsung.com>
Mon, 27 Jul 2015 05:16:22 +0000 (14:16 +0900)
Change-Id: I0fdb32937fbe7290874193263ec2f84cbc92a82e
Signed-off-by: Hyunil Park <hyunil46.park@samsung.com>
src/mm_player_priv.c

index 50bd817..901053e 100644 (file)
@@ -5808,7 +5808,12 @@ __mmplayer_video_stream_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user
                int stride = ((stream.width + 3) & (~3));
                int elevation = stream.height;
                int size = stride * elevation * 3 / 2;
-               gst_memory_map(dataBlock, &mapinfo, GST_MAP_READWRITE);
+               gboolean gst_ret;
+               gst_ret = gst_memory_map(dataBlock, &mapinfo, GST_MAP_READWRITE);
+               if(!gst_ret) {
+                       debug_error("fail to gst_memory_map");
+                       return GST_PAD_PROBE_OK;
+               }
 
                stream.stride[0] = stride;
                stream.elevation[0] = elevation;
@@ -5828,9 +5833,12 @@ __mmplayer_video_stream_probe (GstPad *pad, GstPadProbeInfo *info, gpointer user
                        return TRUE;
                }
                thandle = tbm_bo_map(stream.bo[0], TBM_DEVICE_CPU, TBM_OPTION_WRITE);
-               if(thandle.ptr) {
+               if(thandle.ptr && mapinfo.data)
                        memcpy(thandle.ptr, mapinfo.data, size);
-               }
+               else
+                       debug_error("data pointer is wrong. dest : %p, src : %p",
+                                       thandle.ptr, mapinfo.data);
+
                tbm_bo_unmap(stream.bo[0]);
 
        }