mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 14:32:31 +00:00
oggmux: don't keep a static string beyond the ref of the owning object
Also move down the ref for the caps a bit, so tha we don't leak it in the branch that calls continue.
This commit is contained in:
parent
470f02d186
commit
28d09d43e5
1 changed files with 10 additions and 13 deletions
|
@ -1360,23 +1360,11 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
|
||||||
GstPad *thepad;
|
GstPad *thepad;
|
||||||
GstBuffer *hbuf;
|
GstBuffer *hbuf;
|
||||||
GstMapInfo map;
|
GstMapInfo map;
|
||||||
#ifndef GST_DISABLE_DEBUG
|
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
const gchar *mime_type;
|
const gchar *mime_type = "";
|
||||||
#endif
|
|
||||||
|
|
||||||
pad = (GstOggPadData *) walk->data;
|
pad = (GstOggPadData *) walk->data;
|
||||||
thepad = pad->collect.pad;
|
thepad = pad->collect.pad;
|
||||||
#ifndef GST_DISABLE_DEBUG
|
|
||||||
if ((caps = gst_pad_get_current_caps (thepad))) {
|
|
||||||
GstStructure *structure = gst_caps_get_structure (caps, 0);
|
|
||||||
mime_type = gst_structure_get_name (structure);
|
|
||||||
gst_caps_unref (caps);
|
|
||||||
} else {
|
|
||||||
mime_type = "";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
walk = walk->next;
|
walk = walk->next;
|
||||||
|
|
||||||
pad->packetno = 0;
|
pad->packetno = 0;
|
||||||
|
@ -1398,6 +1386,11 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((caps = gst_pad_get_current_caps (thepad))) {
|
||||||
|
GstStructure *structure = gst_caps_get_structure (caps, 0);
|
||||||
|
mime_type = gst_structure_get_name (structure);
|
||||||
|
}
|
||||||
|
|
||||||
/* create a packet from the buffer */
|
/* create a packet from the buffer */
|
||||||
gst_buffer_map (buf, &map, GST_MAP_READ);
|
gst_buffer_map (buf, &map, GST_MAP_READ);
|
||||||
packet.packet = map.data;
|
packet.packet = map.data;
|
||||||
|
@ -1431,6 +1424,10 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
|
||||||
} else {
|
} else {
|
||||||
hbufs = g_list_append (hbufs, hbuf);
|
hbufs = g_list_append (hbufs, hbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (caps) {
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The Skeleton BOS goes first - even before the video that went first before */
|
/* The Skeleton BOS goes first - even before the video that went first before */
|
||||||
|
|
Loading…
Reference in a new issue