closes bug #119105

Original commit message from CVS:
closes bug #119105
parent dbabbc62
......@@ -12,7 +12,7 @@ AM_MAINTAINER_MODE
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
AS_VERSION(gst-plugins, GST_PLUGINS_VERSION, 0, 6, 2, 1, GST_ERROR="-Wall", GST_ERROR="-Wall -Werror")
AS_VERSION(gst-plugins, GST_PLUGINS_VERSION, 0, 6, 2, 2, GST_ERROR="-Wall", GST_ERROR="-Wall -Werror")
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
dnl our libraries and install dirs use major.minor as a version
......
......@@ -265,10 +265,12 @@ static gboolean
gst_avi_demux_avih (GstAviDemux *avi_demux)
{
gst_riff_avih *avih;
guint8 *avihdata;
GstByteStream *bs = avi_demux->bs;
guint32 got_bytes;
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **)&avih, sizeof (gst_riff_avih));
got_bytes = gst_bytestream_peek_bytes (bs, &avihdata, sizeof (gst_riff_avih));
avih = (gst_riff_avih *) avihdata;
if (got_bytes == sizeof (gst_riff_avih)) {
avi_demux->avih.us_frame = GUINT32_FROM_LE (avih->us_frame);
......@@ -311,10 +313,12 @@ static gboolean
gst_avi_demux_strh (GstAviDemux *avi_demux)
{
gst_riff_strh *strh;
guint8 *strhdata;
GstByteStream *bs = avi_demux->bs;
guint32 got_bytes;
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **)&strh, sizeof (gst_riff_strh));
got_bytes = gst_bytestream_peek_bytes (bs, &strhdata, sizeof (gst_riff_strh));
strh = (gst_riff_strh *) strhdata;
if (got_bytes == sizeof (gst_riff_strh)) {
avi_stream_context *target;
......@@ -379,20 +383,24 @@ static void
gst_avi_demux_dmlh (GstAviDemux *avi_demux)
{
gst_riff_dmlh *dmlh;
guint8 *dmlhdata;
GstByteStream *bs = avi_demux->bs;
guint32 got_bytes;
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **)&dmlh, sizeof (gst_riff_dmlh));
got_bytes = gst_bytestream_peek_bytes (bs, &dmlhdata, sizeof (gst_riff_dmlh));
dmlh = (gst_riff_dmlh *) dmlhdata;
}
static void
gst_avi_demux_strn (GstAviDemux *avi_demux, gint len)
{
gchar *name;
guint8 *namedata;
GstByteStream *bs = avi_demux->bs;
guint32 got_bytes;
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **)&name, len);
got_bytes = gst_bytestream_peek_bytes (bs, &namedata, len);
name = (gchar *) namedata;
if (got_bytes != len)
return;
......@@ -403,13 +411,15 @@ static void
gst_avi_demux_strf_vids (GstAviDemux *avi_demux)
{
gst_riff_strf_vids *strf;
guint8 *strfdata;
GstPad *srcpad;
GstCaps *newcaps = NULL, *capslist = NULL;
avi_stream_context *stream;
GstByteStream *bs = avi_demux->bs;
guint32 got_bytes;
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **)&strf, sizeof (gst_riff_strf_vids));
got_bytes = gst_bytestream_peek_bytes (bs, &strfdata, sizeof (gst_riff_strf_vids));
strf = (gst_riff_strf_vids *) strfdata;
if (got_bytes != sizeof (gst_riff_strf_vids))
return;
......@@ -503,13 +513,15 @@ static void
gst_avi_demux_strf_auds (GstAviDemux *avi_demux)
{
gst_riff_strf_auds *strf;
guint8 *strfdata;
GstPad *srcpad;
GstCaps *newcaps = NULL, *capslist = NULL;
avi_stream_context *stream;
GstByteStream *bs = avi_demux->bs;
guint32 got_bytes;
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **)&strf, sizeof (gst_riff_strf_auds));
got_bytes = gst_bytestream_peek_bytes (bs, &strfdata, sizeof (gst_riff_strf_auds));
strf = (gst_riff_strf_auds *) strfdata;
if (got_bytes != sizeof (gst_riff_strf_auds))
return;
......@@ -606,13 +618,15 @@ static void
gst_avi_demux_strf_iavs (GstAviDemux *avi_demux)
{
gst_riff_strf_iavs *strf;
guint8 *strfdata;
GstPad *srcpad;
GstCaps *newcaps = NULL, *capslist = NULL;
avi_stream_context *stream;
GstByteStream *bs = avi_demux->bs;
guint32 got_bytes;
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **)&strf, sizeof (gst_riff_strf_iavs));
got_bytes = gst_bytestream_peek_bytes (bs, &strfdata, sizeof (gst_riff_strf_iavs));
strf = (gst_riff_strf_iavs *) strfdata;
if (got_bytes != sizeof (gst_riff_strf_iavs))
return;
......@@ -1232,11 +1246,13 @@ gst_avi_demux_loop (GstElement *element)
pos = gst_bytestream_tell (bs);
do {
gst_riff_riff *temp_chunk;
guint8 *tempdata;
guint32 skipsize;
/* read first two dwords to get chunktype and size */
while (TRUE) {
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **) &temp_chunk, sizeof (gst_riff_chunk));
got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_chunk));
temp_chunk = (gst_riff_riff *) tempdata;
if (got_bytes < sizeof (gst_riff_chunk)) {
if (!gst_avi_demux_handle_sink_event (avi_demux))
return;
......@@ -1252,7 +1268,8 @@ gst_avi_demux_loop (GstElement *element)
case GST_RIFF_TAG_LIST:
/* read complete list chunk */
while (TRUE) {
got_bytes = gst_bytestream_peek_bytes (bs, (guint8 **) &temp_chunk, sizeof (gst_riff_list));
got_bytes = gst_bytestream_peek_bytes (bs, &tempdata, sizeof (gst_riff_list));
temp_chunk = (gst_riff_riff *) tempdata;
if (got_bytes < sizeof (gst_riff_list)) {
if (!gst_avi_demux_handle_sink_event (avi_demux))
return;
......
......@@ -14,7 +14,7 @@
*/
/*
for(j = 0; j < num_samples; j++) {
(*out_data)[j] = in_data[j];
out_data[j] = in_data[j];
squaresum += in_data[j] * in_data[j];
}
RMS = sqrt (squaresum / (float) num_samples);
......@@ -24,7 +24,7 @@
*/
for(j = 0; j < num_samples; j++) {
(*out_data)[j] = in_data[j];
out_data[j] = in_data[j];
squaresum += pow ((double) in_data[j] / 32767.0, 2);
}
RMS = sqrt (squaresum / (float) num_samples);
......
......@@ -92,9 +92,9 @@ static void gst_level_set_property (GObject *object, guint prop_id, const GVa
static void gst_level_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
static void gst_level_chain (GstPad *pad, GstBuffer *buf);
static void inline gst_level_fast_16bit_chain (gint16* data, gint16** out_data,
static void inline gst_level_fast_16bit_chain (gint16* data, gint16* out_data,
guint numsamples);
static void inline gst_level_fast_8bit_chain (gint8* data, gint8** out_data,
static void inline gst_level_fast_8bit_chain (gint8* data, gint8* out_data,
guint numsamples);
static GstElementClass *parent_class = NULL;
......@@ -179,12 +179,12 @@ gst_level_chain (GstPad *pad, GstBuffer *buf)
g_print ("%s: ", gst_element_get_name (GST_ELEMENT (filter)));
switch (width) {
case 16:
gst_level_fast_16bit_chain (in_data, &out_data,
gst_level_fast_16bit_chain (in_data, out_data,
GST_BUFFER_SIZE (buf) / 2);
break;
case 8:
gst_level_fast_8bit_chain ((gint8 *) in_data,
(gint8 **) &out_data, GST_BUFFER_SIZE(buf));
(gint8 *) out_data, GST_BUFFER_SIZE(buf));
break;
}
gst_buffer_unref (buf);
......@@ -192,12 +192,12 @@ gst_level_chain (GstPad *pad, GstBuffer *buf)
}
static void inline
gst_level_fast_16bit_chain (gint16* in_data, gint16** out_data,
gst_level_fast_16bit_chain (gint16* in_data, gint16* out_data,
guint num_samples)
#include "filter.func"
static void inline
gst_level_fast_8bit_chain (gint8* in_data, gint8** out_data,
gst_level_fast_8bit_chain (gint8* in_data, gint8* out_data,
guint num_samples)
#include "filter.func"
......
......@@ -363,11 +363,13 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
GstByteStream * bs = qtdemux->bs;
GstQtpAtomMinHeader * amh = NULL;
guint64 * esize=NULL;
guint8 * ptr;
/* FIXME this can't be right, rewrite with _read */
do { /* do ... while (event()) is necessary for bytestream events */
if (!amh) {
if (gst_bytestream_peek_bytes (bs, (guint8**)&amh, 8) == 8) {
if (gst_bytestream_peek_bytes (bs, &ptr, 8) == 8) {
amh = (GstQtpAtomMinHeader *)ptr;
atom->size = GUINT32_FROM_BE(amh->size);
atom->type = amh->type; /* don't need to turn this around magicly FIXME this can depend on endiannes */
atom->start = qtdemux->bs_pos;
......@@ -377,7 +379,8 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
}
if (amh) {
if (atom->size == 1) { /* need to peek extended size field */
if (gst_bytestream_peek_bytes (bs, (guint8**)&esize, 8) == 8) {
if (gst_bytestream_peek_bytes (bs, &ptr, 8) == 8) {
esize = (guint64 *)ptr;
atom->size = GUINT64_FROM_BE(*esize);
gst_bytestream_flush (bs, 8);
qtdemux->bs_pos += 8;
......@@ -394,11 +397,11 @@ gst_qtp_read_bytes_atom_head(GstQTDemux * qtdemux,GstQtpAtom * atom)
static void
gst_qtp_read_bytes(GstQTDemux * qtdemux, void * buffer, size_t size)
{
void * data;
guint8 * data;
GstByteStream * bs = qtdemux->bs;
do {
if (gst_bytestream_peek_bytes (bs, (guint8**)&data, size) == size) {
if (gst_bytestream_peek_bytes (bs, &data, size) == size) {
memcpy(buffer,data,size);
gst_bytestream_flush(bs,size);
qtdemux->bs_pos += size;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment