mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
mpegtsparse: use fixed size array rather than dynamically allocating
This commit is contained in:
parent
f9c4b3cce9
commit
ae75b6f366
2 changed files with 2 additions and 3 deletions
|
@ -155,7 +155,7 @@ static void
|
|||
mpegts_packetizer_init (MpegTSPacketizer * packetizer)
|
||||
{
|
||||
packetizer->adapter = gst_adapter_new ();
|
||||
packetizer->streams = g_new0 (MpegTSPacketizerStream *, 8192);
|
||||
memset (packetizer->streams, 0, 8192);
|
||||
packetizer->know_packet_size = FALSE;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,6 @@ mpegts_packetizer_dispose (GObject * object)
|
|||
if (packetizer->streams[i])
|
||||
mpegts_packetizer_stream_free (packetizer->streams[i]);
|
||||
}
|
||||
g_free (packetizer->streams);
|
||||
}
|
||||
|
||||
gst_adapter_clear (packetizer->adapter);
|
||||
|
|
|
@ -67,7 +67,7 @@ struct _MpegTSPacketizer {
|
|||
|
||||
GstAdapter *adapter;
|
||||
/* streams hashed by pid */
|
||||
MpegTSPacketizerStream **streams;
|
||||
MpegTSPacketizerStream *streams[8192];
|
||||
gboolean disposed;
|
||||
gboolean know_packet_size;
|
||||
guint16 packet_size;
|
||||
|
|
Loading…
Reference in a new issue