mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +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>
|
||||
|
||||
* 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:{
|
||||
GstTypeFindProbability prob = 0;
|
||||
GstCaps *caps = NULL;
|
||||
gboolean found = FALSE;
|
||||
|
||||
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) {
|
||||
g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE],
|
||||
0, prob, caps);
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND,
|
||||
(NULL), (NULL));
|
||||
found = TRUE;
|
||||
}
|
||||
gst_caps_replace (&caps, NULL);
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
GST_ELEMENT_ERROR (typefind, STREAM, TYPE_NOT_FOUND,
|
||||
(NULL), (NULL));
|
||||
}
|
||||
|
||||
stop_typefinding (typefind);
|
||||
res = gst_pad_event_default (pad, event);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue