tools: play: fix endless loop on unhandled keys
authorTim-Philipp Müller <tim@centricular.com>
Sun, 24 Nov 2013 14:33:24 +0000 (14:33 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 24 Nov 2013 14:33:51 +0000 (14:33 +0000)
When debugging output is not enabled.

tools/gst-play.c

index 7715b6a..f42ba39 100644 (file)
@@ -516,8 +516,8 @@ keyboard_cb (const gchar * key_input, gpointer user_data)
     case 27:                   /* ESC */
     default:
       GST_INFO ("keyboard input:");
-      while (*key_input)
-        GST_INFO ("  code %3d", *key_input++);
+      for (; *key_input != '\0'; ++key_input)
+        GST_INFO ("  code %3d", *key_input);
       break;
   }
 }