[Bug 794551] Memory leak in mpegtsmux
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Mar 25 05:02:41 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=794551
--- Comment #2 from Nastooh <ht.techdev at gmail.com> ---
It turns out the problem was due to invalid PID range:
mpegtsmux.c/new_packet_common_init :
...
if (!mux->streamheader_sent && data) {
guint pid = ((data[1] & 0x1f) << 8) | data[2];
/* if it's a PAT or a PMT */
if (pid == 0x00 || (pid >= TSMUX_START_PMT_PID && pid <
TSMUX_START_ES_PID)) {
GstBuffer *hbuf;
if (!buf) {
hbuf = gst_buffer_new_and_alloc (len);
gst_buffer_fill (hbuf, 0, data, len);
} else {
hbuf = gst_buffer_copy (buf);
}
GST_LOG_OBJECT (mux,
"Collecting packet with pid 0x%04x (len=%d) into
streamheaders", pid,len);
g_queue_push_tail (&mux->streamheader, hbuf);
} else if (!g_queue_is_empty (&mux->streamheader)) {
...
i.e., video pids were indefinitely pushed into streamheader queue. In my
case, removing condition following "||" is all I need. However, perhaps,
checking on the size of the queue, and flushing, may be more appropriate.
Cheers,
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list