mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
libs/gst/dataprotocol/dataprotocol.c: Fixes in reading/writing events over GDP (not currently used?) - dereferencing ...
Original commit message from CVS: * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event), (gst_dp_event_from_packet): Fixes in reading/writing events over GDP (not currently used?) - dereferencing NULL events for unknown/invalid event types, memory leak, and change g_warning to GST_WARNING.
This commit is contained in:
parent
ca144eb425
commit
700f5d074f
2 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
|||
2006-04-28 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event),
|
||||
(gst_dp_event_from_packet):
|
||||
Fixes in reading/writing events over GDP (not currently used?) -
|
||||
dereferencing NULL events for unknown/invalid event types, memory
|
||||
leak, and change g_warning to GST_WARNING.
|
||||
|
||||
2006-04-28 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* libs/gst/base/gstbasesink.c: (gst_base_sink_is_too_late),
|
||||
|
|
|
@ -319,7 +319,7 @@ gst_dp_packet_from_event (const GstEvent * event, GstDPHeaderFlag flags,
|
|||
/* first construct payload, since we need the length */
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_UNKNOWN:
|
||||
g_warning ("Unknown event, ignoring");
|
||||
GST_WARNING ("Unknown event, ignoring");
|
||||
*length = 0;
|
||||
g_free (h);
|
||||
return FALSE;
|
||||
|
@ -355,10 +355,12 @@ gst_dp_packet_from_event (const GstEvent * event, GstDPHeaderFlag flags,
|
|||
case GST_EVENT_QOS:
|
||||
case GST_EVENT_NAVIGATION:
|
||||
case GST_EVENT_TAG:
|
||||
g_warning ("Unhandled event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
GST_WARNING ("Unhandled event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
*length = 0;
|
||||
g_free (h);
|
||||
return FALSE;
|
||||
default:
|
||||
g_warning ("Unknown event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
GST_WARNING ("Unknown event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
*length = 0;
|
||||
g_free (h);
|
||||
return FALSE;
|
||||
|
@ -486,7 +488,7 @@ gst_dp_event_from_packet (guint header_length, const guint8 * header,
|
|||
type = GST_DP_HEADER_PAYLOAD_TYPE (header) - GST_DP_PAYLOAD_EVENT_NONE;
|
||||
switch (type) {
|
||||
case GST_EVENT_UNKNOWN:
|
||||
g_warning ("Unknown event, ignoring");
|
||||
GST_WARNING ("Unknown event, ignoring");
|
||||
return FALSE;
|
||||
case GST_EVENT_EOS:
|
||||
case GST_EVENT_FLUSH_START:
|
||||
|
@ -520,10 +522,10 @@ gst_dp_event_from_packet (guint header_length, const guint8 * header,
|
|||
case GST_EVENT_QOS:
|
||||
case GST_EVENT_NAVIGATION:
|
||||
case GST_EVENT_TAG:
|
||||
g_warning ("Unhandled event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
GST_WARNING ("Unhandled event type %d, ignoring", type);
|
||||
return FALSE;
|
||||
default:
|
||||
g_warning ("Unknown event type %d, ignoring", GST_EVENT_TYPE (event));
|
||||
GST_WARNING ("Unknown event type %d, ignoring", type);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue