summaryrefslogtreecommitdiffstats
path: root/ext/mplex/multplex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mplex/multplex.cc')
-rw-r--r--ext/mplex/multplex.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/mplex/multplex.cc b/ext/mplex/multplex.cc
index dcdc97ba..1cb0d908 100644
--- a/ext/mplex/multplex.cc
+++ b/ext/mplex/multplex.cc
@@ -11,6 +11,7 @@
#include "videostrm.hh"
#include "outputstream.hh"
#include <cassert>
+#include "glib.h"
/*******************************************************************
@@ -1085,9 +1086,11 @@ OutputStream::OutputDVDPriv2 ()
{
uint8_t *packet_size_field;
uint8_t *index;
- uint8_t sector_buf[sector_size];
+ uint8_t *sector_buf;
unsigned int tozero;
+ sector_buf = g_new0(uint8_t, sector_size);
+
assert (sector_size == 2048);
PS_Stream::BufferSectorHeader (sector_buf, pack_header_ptr, &sys_header, index);
PS_Stream::BufferPacketHeader (index, PRIVATE_STR_2, 2, // MPEG 2
@@ -1109,6 +1112,8 @@ OutputStream::OutputDVDPriv2 ()
PS_Stream::BufferPacketSize (packet_size_field, index);
WriteRawSector (sector_buf, sector_size);
+
+ g_free(sector_buf);
}