From b34c0e7e5358d712e09b4ad8b7bd68ae83a81a8a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 1 Aug 2005 21:14:22 +0000 Subject: [PATCH] configure.ac: When testing for X libs, use the X CFlags Original commit message from CVS: * configure.ac: When testing for X libs, use the X CFlags * gst/adder/gstadder.c: (gst_adder_change_state): Stop the collectpads before calling parent state change function on PAUSED->READY, otherwise we deadlock deactivating pads. --- ChangeLog | 7 +++++++ configure.ac | 7 +++++++ gst/adder/gstadder.c | 14 +++----------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index a75010a593..ffe687b261 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-08-01 Jan Schmidt + * configure.ac: + When testing for X libs, use the X CFlags + * gst/adder/gstadder.c: (gst_adder_change_state): + Stop the collectpads before calling parent state change function + on PAUSED->READY, otherwise we deadlock deactivating pads. + 2005-08-01 Stefan Kost * configure.ac: diff --git a/configure.ac b/configure.ac index d2acaffddc..d1fe2782b0 100644 --- a/configure.ac +++ b/configure.ac @@ -415,6 +415,11 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_X, true) GST_CHECK_FEATURE(X, [X libraries and plugins], [ximagesink], [ AC_PATH_XTRA + ac_cflags_save="$CFLAGS" + ac_cppflags_save="$CPPFLAGS" + CFLAGS="$CFLAGS $X_CFLAGS" + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + dnl now try to find the HEADER AC_CHECK_HEADER(X11/Xlib.h, HAVE_X="yes", HAVE_X="no") @@ -431,6 +436,8 @@ GST_CHECK_FEATURE(X, [X libraries and plugins], AC_SUBST(X_LIBS) fi AC_SUBST(HAVE_X) + CFLAGS="$ac_cflags_save" + CPPFLAGS="$ac_cppflags_save" ]) dnl *** XVideo *** diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index 4969084c45..87dcea9533 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -419,23 +419,15 @@ gst_adder_change_state (GstElement * element) break; case GST_STATE_PAUSED_TO_PLAYING: break; + case GST_STATE_PAUSED_TO_READY: + gst_collectpads_stop (adder->collect); + break; default: break; } ret = GST_ELEMENT_CLASS (parent_class)->change_state (element); - switch (transition) { - case GST_STATE_PLAYING_TO_PAUSED: - break; - case GST_STATE_PAUSED_TO_READY: - gst_collectpads_stop (adder->collect); - break; - case GST_STATE_READY_TO_NULL: - break; - default: - break; - } return ret; }