summaryrefslogtreecommitdiffstats
path: root/ext/mplex
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2003-07-25 10:15:53 +0000
committerBrian Cameron <brian.cameron@sun.com>2003-07-25 10:15:53 +0000
commita3dff6621738f971d1f9cabbdfb4ba2aa664d194 (patch)
tree0980d18c5223435c529ab67c217185a87313007a /ext/mplex
parent6dd1ca288fb14d8ebfe3be2c050f6bb2dd4330c8 (diff)
downloadgst-plugins-bad-a3dff6621738f971d1f9cabbdfb4ba2aa664d194.tar.gz
gst-plugins-bad-a3dff6621738f971d1f9cabbdfb4ba2aa664d194.tar.bz2
gst-plugins-bad-a3dff6621738f971d1f9cabbdfb4ba2aa664d194.zip
Fixes to allow plugin to build with Forte.
Original commit message from CVS: Fixes to allow plugin to build with Forte.
Diffstat (limited to 'ext/mplex')
-rw-r--r--ext/mplex/fastintfns.h3
-rw-r--r--ext/mplex/multplex.cc7
-rw-r--r--ext/mplex/vector.cc2
-rw-r--r--ext/mplex/yuv4mpeg_ratio.cc2
4 files changed, 11 insertions, 3 deletions
diff --git a/ext/mplex/fastintfns.h b/ext/mplex/fastintfns.h
index db78af1e..7c1ec130 100644
--- a/ext/mplex/fastintfns.h
+++ b/ext/mplex/fastintfns.h
@@ -4,6 +4,9 @@
*
*/
+#ifndef __inline__
+#define __inline__ inline
+#endif
static __inline__ int intmax( register int x, register int y )
{
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);
}
diff --git a/ext/mplex/vector.cc b/ext/mplex/vector.cc
index 343b6284..901b1a5e 100644
--- a/ext/mplex/vector.cc
+++ b/ext/mplex/vector.cc
@@ -9,7 +9,7 @@
AUStream::AUStream ():
cur_rd (0), cur_wr (0), totalctr (0), size (0), buf (0)
{
- buf = new (Aunit *)[AUStream::BUF_SIZE];
+ buf = new (Aunit **)[AUStream::BUF_SIZE];
}
diff --git a/ext/mplex/yuv4mpeg_ratio.cc b/ext/mplex/yuv4mpeg_ratio.cc
index a20a2373..262df6f9 100644
--- a/ext/mplex/yuv4mpeg_ratio.cc
+++ b/ext/mplex/yuv4mpeg_ratio.cc
@@ -109,7 +109,7 @@ y4m_ratio_reduce (y4m_ratio_t * r)
int
y4m_parse_ratio (y4m_ratio_t * r, const char *s)
{
- char *t = strchr (s, ':');
+ char *t = (char *) strchr (s, ':');
if (t == NULL)
return Y4M_ERR_RANGE;