MMFMWK-8393 fix gplay can not exit when --quiet

- Add g_main_loop_quit() in eos_cb() and error_cb()
  as there is no display thread when --quiet
  which will cause block in scanf

Signed-off-by: Lyon Wang <lyon.wang@nxp.com>
diff --git a/tools/gplay2/gplay2.c b/tools/gplay2/gplay2.c
index abbc53c..136bf3e 100755
--- a/tools/gplay2/gplay2.c
+++ b/tools/gplay2/gplay2.c
@@ -865,6 +865,11 @@
     gexit_input_thread = TRUE;
     gexit_display_thread = TRUE;
   }
+  if (gexit_input_thread == TRUE ) {
+    if (g_main_loop_is_running (gloop) == TRUE) {
+      g_main_loop_quit (gloop);
+    }
+  }
 }
 
 static void
@@ -894,6 +899,11 @@
     gexit_input_thread = TRUE;
     gexit_display_thread = TRUE;
   }
+  if (gexit_input_thread == TRUE ) {
+    if (g_main_loop_is_running (gloop) == TRUE) {
+      g_main_loop_quit (gloop);
+    }
+  }
 }
 
 static void