Add error check for itc crash 19/42919/1
authorHyunil Park <hyunil46.park@samsung.com>
Mon, 6 Jul 2015 05:11:42 +0000 (14:11 +0900)
committerHyunil Park <hyunil46.park@samsung.com>
Mon, 6 Jul 2015 05:11:42 +0000 (14:11 +0900)
Change-Id: I1a6ce8f2a90ba1c6150ac17dabc7f9fdbb389c58
Signed-off-by: Hyunil Park <hyunil46.park@samsung.com>
src/include/mm_player.h
src/mm_player_es.c

index 7db7ba2..a1138e1 100755 (executable)
@@ -741,7 +741,9 @@ typedef enum {
  */
 typedef enum {
        MM_PLAYER_TRACK_TYPE_AUDIO = 0,
+#if (defined _USE_M_V_INPUT_SELECTOR_ || defined TEST_ES)
        MM_PLAYER_TRACK_TYPE_VIDEO,
+#endif
        MM_PLAYER_TRACK_TYPE_TEXT,
        MM_PLAYER_TRACK_TYPE_MAX
 }MMPlayerTrackType;
index c8f9823..4e013b1 100755 (executable)
@@ -346,8 +346,12 @@ _mmplayer_submit_packet (MMHandleType hplayer, media_packet_h packet)
   MMPlayerTrackType streamtype = MM_PLAYER_TRACK_TYPE_AUDIO;
   media_format_h fmt = NULL;
 
-  return_val_if_fail (player, MM_ERROR_PLAYER_NOT_INITIALIZED);
   return_val_if_fail (packet, MM_ERROR_INVALID_ARGUMENT);
+  return_val_if_fail ( player &&
+    player->pipeline &&
+    player->pipeline->mainbin &&
+    player->pipeline->mainbin[MMPLAYER_M_SRC].gst,
+    MM_ERROR_PLAYER_INTERNAL );
 
   /* get data */
   media_packet_get_buffer_data_ptr (packet, (void **) &buf);