Commit 77bf6d8c authored by Ronald S. Bultje's avatar Ronald S. Bultje
Browse files

gst/gstbin.c: Remove a piece of code that could never be reached.

Original commit message from CVS:
* gst/gstbin.c: (gst_bin_child_state_change_func):
Remove a piece of code that could never be reached.
* docs/gst/gstreamer-sections.txt:
* gst/gstpad.c: (gst_pad_push), (gst_pad_pull),
(gst_pad_call_get_function):
* gst/gstpad.h:
* testsuite/pad/Makefile.am:
Fix #150546, enable tests.
parent d8d03b6b
2005-01-31 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/gstbin.c: (gst_bin_child_state_change_func):
Remove a piece of code that could never be reached.
* docs/gst/gstreamer-sections.txt:
* gst/gstpad.c: (gst_pad_push), (gst_pad_pull),
(gst_pad_call_get_function):
* gst/gstpad.h:
* testsuite/pad/Makefile.am:
Fix #150546, enable tests.
2005-01-31 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* docs/pwg/advanced-types.xml:
......
......@@ -1272,6 +1272,7 @@ gst_queue_get_type
<FILE>gstrealpad</FILE>
<TITLE>GstRealPad</TITLE>
GstRealPad
GstRealPadFlags
GST_IS_REAL_PAD_FAST
GST_RPAD_DIRECTION
GST_RPAD_CAPS
......@@ -1303,7 +1304,9 @@ GST_IS_REAL_PAD
GST_REAL_PAD_CLASS
GST_IS_REAL_PAD_CLASS
GST_TYPE_REAL_PAD
GST_TYPE_REAL_PAD_FLAGS
<SUBSECTION Private>
gst_real_pad_flags_get_type
gst_real_pad_get_type
</SECTION>
......
......@@ -705,7 +705,7 @@ gst_bin_child_state_change_func (GstBin * bin, GstElementState oldstate,
bin->child_states[new_idx]++;
for (i = GST_NUM_STATES - 1; i >= 0; i--) {
if (bin->child_states[i] != 0 || i == 0) {
if (bin->child_states[i] != 0) {
gint state = (1 << i);
/* We only change state on the parent if the state is not locked.
......
......@@ -3242,6 +3242,8 @@ gst_pad_push (GstPad * pad, GstData * data)
g_return_if_fail (GST_IS_PAD (pad));
g_return_if_fail (GST_PAD_DIRECTION (pad) == GST_PAD_SRC);
g_return_if_fail (!GST_FLAG_IS_SET (GST_PAD_REALIZE (pad),
GST_RPAD_IN_GETFUNC));
g_return_if_fail (data != NULL);
DEBUG_DATA (pad, data, "gst_pad_push");
......@@ -3318,6 +3320,9 @@ gst_pad_pull (GstPad * pad)
g_return_val_if_fail (GST_PAD_DIRECTION (pad) == GST_PAD_SINK,
GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)));
g_return_val_if_fail (!GST_FLAG_IS_SET (GST_PAD_REALIZE (pad),
GST_RPAD_IN_CHAINFUNC),
GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)));
peer = GST_RPAD_PEER (pad);
......@@ -4428,7 +4433,9 @@ gst_pad_get_formats (GstPad * pad)
!GST_FLAG_IS_SET (gst_pad_get_parent (pad), GST_ELEMENT_EVENT_AWARE)) { \
gst_pad_send_event (pad, GST_EVENT (__temp)); \
} else { \
GST_FLAG_SET (pad, GST_RPAD_IN_CHAINFUNC); \
GST_RPAD_CHAINFUNC (pad) (pad, __temp); \
GST_FLAG_UNSET (pad, GST_RPAD_IN_CHAINFUNC); \
} \
}G_STMT_END
/**
......@@ -4495,7 +4502,9 @@ gst_pad_call_get_function (GstPad * pad)
g_return_val_if_fail (GST_PAD_IS_SRC (pad), NULL);
g_return_val_if_fail (GST_RPAD_GETFUNC (pad) != NULL, NULL);
GST_FLAG_SET (pad, GST_RPAD_IN_GETFUNC);
data = GST_RPAD_GETFUNC (pad) (pad);
GST_FLAG_UNSET (pad, GST_RPAD_IN_GETFUNC);
DEBUG_DATA (pad, data, "getfunction returned");
return data;
}
......@@ -161,6 +161,12 @@ struct _GstPadClass {
gpointer _gst_reserved[GST_PADDING];
};
typedef enum {
GST_RPAD_IN_GETFUNC = GST_PAD_FLAG_LAST,
GST_RPAD_IN_CHAINFUNC,
GST_RPAD_FLAG_LAST = GST_PAD_FLAG_LAST + 4
} GstRealPadFlags;
struct _GstRealPad {
GstPad pad;
......
include ../Rules
tests_pass = link
tests_fail =
tests_ignore = chainnopull getnopush
tests_fail = chainnopull getnopush
tests_ignore =
include ../Rules
tests_pass = link
tests_fail =
tests_ignore = chainnopull getnopush
tests_fail = chainnopull getnopush
tests_ignore =
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment