mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
plugins/elements/gsttypefindelement.c: reverted wrong change and reflowed code to avoid others falling into this trap
Original commit message from CVS: * plugins/elements/gsttypefindelement.c: (gst_type_find_element_handle_event): reverted wrong change and reflowed code to avoid others falling into this trap
This commit is contained in:
parent
d3211824bd
commit
9cc956c370
2 changed files with 14 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-04-29 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* plugins/elements/gsttypefindelement.c:
|
||||||
|
(gst_type_find_element_handle_event):
|
||||||
|
reverted wrong change and reflowed code to avoid others falling into
|
||||||
|
this trap
|
||||||
|
|
||||||
2006-04-28 Stefan Kost <ensonic@users.sf.net>
|
2006-04-28 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
|
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_event):
|
||||||
|
|
|
@ -468,6 +468,7 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
|
||||||
case GST_EVENT_EOS:{
|
case GST_EVENT_EOS:{
|
||||||
GstTypeFindProbability prob = 0;
|
GstTypeFindProbability prob = 0;
|
||||||
GstCaps *caps = NULL;
|
GstCaps *caps = NULL;
|
||||||
|
gboolean found = FALSE;
|
||||||
|
|
||||||
GST_INFO_OBJECT (typefind, "Got EOS and no type found yet");
|
GST_INFO_OBJECT (typefind, "Got EOS and no type found yet");
|
||||||
|
|
||||||
|
@ -480,13 +481,16 @@ gst_type_find_element_handle_event (GstPad * pad, GstEvent * event)
|
||||||
if (caps && prob >= typefind->min_probability) {
|
if (caps && prob >= typefind->min_probability) {
|
||||||
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
|
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
|
||||||
0, prob, caps);
|
0, prob, caps);
|
||||||
} else {
|
found = TRUE;
|
||||||
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND,
|
|
||||||
(NULL), (NULL));
|
|
||||||
}
|
}
|
||||||
gst_caps_replace (&caps, NULL);
|
gst_caps_replace (&caps, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND,
|
||||||
|
(NULL), (NULL));
|
||||||
|
}
|
||||||
|
|
||||||
stop_typefinding (typefind);
|
stop_typefinding (typefind);
|
||||||
res = gst_pad_event_default (pad, event);
|
res = gst_pad_event_default (pad, event);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue