From: Thomas Vander Stichele Date: Tue, 11 Oct 2005 15:26:58 +0000 (+0000) Subject: configure.ac: if we don't have glib, fail before testing 2.8 X-Git-Tag: RELEASE-0_9_4~136 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b9e6b3effbfc22843cd0d34e75e271d28fc3b5e;p=platform%2Fupstream%2Fgstreamer.git configure.ac: if we don't have glib, fail before testing 2.8 Original commit message from CVS: * configure.ac: if we don't have glib, fail before testing 2.8 * gst/base/gstbasetransform.c: (gst_base_transform_change_state): fix a leak, should fix plugins-base testsuite --- diff --git a/ChangeLog b/ChangeLog index 6ca1c09..f6f42f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-11 Thomas Vander Stichele + + * configure.ac: + if we don't have glib, fail before testing 2.8 + * gst/base/gstbasetransform.c: (gst_base_transform_change_state): + fix a leak, should fix plugins-base testsuite + 2005-10-11 Andy Wingo * gst/gstpad.c (pre_activate): Renamed from pre_activate_switch, diff --git a/configure.ac b/configure.ac index 51e167b..8658ff6 100644 --- a/configure.ac +++ b/configure.ac @@ -227,7 +227,15 @@ GLIB2_REQ="2.6" AC_SUBST(GLIB2_REQ) dnl Check for glib2 with sugar on top -PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQ gobject-2.0 gthread-2.0 gmodule-2.0,HAVE_GLIB2=yes,HAVE_GLIB2=no) +PKG_CHECK_MODULES(GLIB2, + glib-2.0 >= $GLIB2_REQ gobject-2.0 gthread-2.0 gmodule-2.0, + HAVE_GLIB2=yes, + HAVE_GLIB2=no) + +if test "x$HAVE_GLIB2" = "xno"; then + AC_MSG_ERROR([GStreamer requires GLib $GLIB2_REQ to compile.]) +fi + dnl for the poor souls who for example have glib in /usr/local AS_SCRUB_INCLUDE(GLIB2_CFLAGS) GLIB_LIBS=$GLIB2_LIBS @@ -245,10 +253,6 @@ else fi AC_SUBST(GST_HAVE_GLIB_2_8_DEFINE) -if test "x$HAVE_GLIB2" = "xno"; then - AC_MSG_ERROR([GStreamer requires GLib $GLIB2_REQ to compile.]) -fi - dnl Check for glib2 without extra fat, useful for the unversioned tool frontends PKG_CHECK_MODULES(GLIB_ONLY, glib-2.0 >= $GLIB2_REQ) AC_SUBST(GLIB_ONLY_CFLAGS) diff --git a/gst/base/gstbasetransform.c b/gst/base/gstbasetransform.c index b9b8cc6..cb13bad 100644 --- a/gst/base/gstbasetransform.c +++ b/gst/base/gstbasetransform.c @@ -1335,13 +1335,14 @@ gst_base_transform_change_state (GstElement * element, else trans->have_same_caps = trans->passthrough; GST_DEBUG_OBJECT (trans, "have_same_caps %d", trans->have_same_caps); - gst_caps_replace (&trans->cache_caps1, NULL); - gst_caps_replace (&trans->cache_caps2, NULL); trans->negotiated = FALSE; GST_UNLOCK (trans); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_caps_replace (&trans->cache_caps1, NULL); + gst_caps_replace (&trans->cache_caps2, NULL); default: break; } diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index b9b8cc6..cb13bad 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1335,13 +1335,14 @@ gst_base_transform_change_state (GstElement * element, else trans->have_same_caps = trans->passthrough; GST_DEBUG_OBJECT (trans, "have_same_caps %d", trans->have_same_caps); - gst_caps_replace (&trans->cache_caps1, NULL); - gst_caps_replace (&trans->cache_caps2, NULL); trans->negotiated = FALSE; GST_UNLOCK (trans); break; case GST_STATE_CHANGE_PAUSED_TO_PLAYING: break; + case GST_STATE_CHANGE_PAUSED_TO_READY: + gst_caps_replace (&trans->cache_caps1, NULL); + gst_caps_replace (&trans->cache_caps2, NULL); default: break; }