playback-test: Set buffer-size only for non-negative size

https://bugzilla.gnome.org/show_bug.cgi?id=729617
This commit is contained in:
Ravi Kiran K N 2014-05-06 11:31:18 +05:30 committed by Sebastian Dröge
parent 35f25433f1
commit 07a637e284

View file

@ -2131,7 +2131,8 @@ realize_cb (GtkWidget * widget, PlaybackApp * app)
#if defined (GDK_WINDOWING_WIN32)
app->embed_xid = (guintptr) GDK_WINDOW_HWND (window);
g_print ("Window realize: video window HWND = %" G_GUINTPTR_FORMAT "\n", app->embed_xid);
g_print ("Window realize: video window HWND = %" G_GUINTPTR_FORMAT "\n",
app->embed_xid);
#elif defined (GDK_WINDOWING_QUARTZ)
app->embed_xid = (guintptr) gdk_quartz_window_get_nsview (window);
g_print ("Window realize: video window NSView = %p\n", app->embed_xid);
@ -2421,7 +2422,7 @@ buffer_size_activate_cb (GtkEntry * entry, PlaybackApp * app)
gchar *endptr;
v = g_ascii_strtoll (text, &endptr, 10);
if (endptr != text && v != G_MAXINT64 && v != G_MININT64) {
if (endptr != text && v != G_MAXINT64 && v != G_MININT64 && v >= 0) {
g_object_set (app->pipeline, "buffer-size", v, NULL);
}
}