gst/: Misc. fixes for problems discovered by Forte (different return types in function declaration and definition, po...

Original commit message from CVS:
Patch by: Josep Torra Valles  <josep at fluendo com>
* gst/iec958/ac3_padder.c: (ac3p_init):
* gst/mpegstream/gstmpegparse.c:
* gst/realmedia/rmdemux.c: (gst_rmdemux_parse__rmf),
(gst_rmdemux_parse_prop), (gst_rmdemux_parse_mdpr),
(gst_rmdemux_parse_indx), (gst_rmdemux_parse_indx_data),
(gst_rmdemux_parse_data), (gst_rmdemux_parse_cont),
(gst_rmdemux_parse_packet):
Misc. fixes for problems discovered by Forte (different return types
in function declaration and definition, pointer arithmetics with
void pointers). Fixes #362639.
This commit is contained in:
Josep Torra Valles 2006-10-16 18:07:23 +00:00 committed by Tim-Philipp Müller
parent 4e9ae61a9e
commit eb6d9ca631
4 changed files with 35 additions and 19 deletions

View file

@ -1,3 +1,18 @@
2006-10-16 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Josep Torra Valles <josep at fluendo com>
* gst/iec958/ac3_padder.c: (ac3p_init):
* gst/mpegstream/gstmpegparse.c:
* gst/realmedia/rmdemux.c: (gst_rmdemux_parse__rmf),
(gst_rmdemux_parse_prop), (gst_rmdemux_parse_mdpr),
(gst_rmdemux_parse_indx), (gst_rmdemux_parse_indx_data),
(gst_rmdemux_parse_data), (gst_rmdemux_parse_cont),
(gst_rmdemux_parse_packet):
Misc. fixes for problems discovered by Forte (different return types
in function declaration and definition, pointer arithmetics with
void pointers). Fixes #362639.
2006-10-13 Tim-Philipp Müller <tim at centricular dot net>
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_goto_title):

View file

@ -143,7 +143,7 @@ ac3_crc_validate (ac3_crc_state * state)
void
ac3p_init (ac3_padder * padder)
{
const char sync[4] = { 0xF8, 0x72, 0x4E, 0x1F };
const guint8 sync[4] = { 0xF8, 0x72, 0x4E, 0x1F };
padder->state = AC3P_STATE_SYNC1;

View file

@ -104,7 +104,7 @@ static GstClockTime gst_mpeg_parse_adjust_ts (GstMPEGParse * mpeg_parse,
static GstFlowReturn gst_mpeg_parse_send_buffer (GstMPEGParse * mpeg_parse,
GstBuffer * buffer, GstClockTime time);
static GstFlowReturn gst_mpeg_parse_process_event (GstMPEGParse * mpeg_parse,
static gboolean gst_mpeg_parse_process_event (GstMPEGParse * mpeg_parse,
GstEvent * event);
static gboolean gst_mpeg_parse_send_event (GstMPEGParse * mpeg_parse,
GstEvent * event);

View file

@ -135,22 +135,22 @@ static gboolean gst_rmdemux_src_query (GstPad * pad, GstQuery * query);
static gboolean gst_rmdemux_perform_seek (GstRMDemux * rmdemux,
GstEvent * event);
static void gst_rmdemux_parse__rmf (GstRMDemux * rmdemux, const void *data,
static void gst_rmdemux_parse__rmf (GstRMDemux * rmdemux, const guint8 * data,
int length);
static void gst_rmdemux_parse_prop (GstRMDemux * rmdemux, const void *data,
static void gst_rmdemux_parse_prop (GstRMDemux * rmdemux, const guint8 * data,
int length);
static void gst_rmdemux_parse_mdpr (GstRMDemux * rmdemux,
const void *data, int length);
static guint gst_rmdemux_parse_indx (GstRMDemux * rmdemux, const void *data,
const guint8 * data, int length);
static guint gst_rmdemux_parse_indx (GstRMDemux * rmdemux, const guint8 * data,
int length);
static void gst_rmdemux_parse_data (GstRMDemux * rmdemux, const void *data,
static void gst_rmdemux_parse_data (GstRMDemux * rmdemux, const guint8 * data,
int length);
static void gst_rmdemux_parse_cont (GstRMDemux * rmdemux, const void *data,
static void gst_rmdemux_parse_cont (GstRMDemux * rmdemux, const guint8 * data,
int length);
static GstFlowReturn gst_rmdemux_parse_packet (GstRMDemux * rmdemux,
const void *data, guint16 version, guint16 length);
static void gst_rmdemux_parse_indx_data (GstRMDemux * rmdemux, const void *data,
int length);
const guint8 * data, guint16 version, guint16 length);
static void gst_rmdemux_parse_indx_data (GstRMDemux * rmdemux,
const guint8 * data, int length);
static void gst_rmdemux_stream_clear_cached_subpackets (GstRMDemux * rmdemux,
GstRMDemuxStream * stream);
static GstRMDemuxStream *gst_rmdemux_get_stream_by_id (GstRMDemux * rmdemux,
@ -1444,14 +1444,14 @@ re_skip_pascal_string (const guint8 * ptr)
}
static void
gst_rmdemux_parse__rmf (GstRMDemux * rmdemux, const void *data, int length)
gst_rmdemux_parse__rmf (GstRMDemux * rmdemux, const guint8 * data, int length)
{
GST_LOG_OBJECT (rmdemux, "file_version: %d", RMDEMUX_GUINT32_GET (data));
GST_LOG_OBJECT (rmdemux, "num_headers: %d", RMDEMUX_GUINT32_GET (data + 4));
}
static void
gst_rmdemux_parse_prop (GstRMDemux * rmdemux, const void *data, int length)
gst_rmdemux_parse_prop (GstRMDemux * rmdemux, const guint8 * data, int length)
{
GST_LOG_OBJECT (rmdemux, "max bitrate: %d", RMDEMUX_GUINT32_GET (data));
GST_LOG_OBJECT (rmdemux, "avg bitrate: %d", RMDEMUX_GUINT32_GET (data + 4));
@ -1477,7 +1477,7 @@ gst_rmdemux_parse_prop (GstRMDemux * rmdemux, const void *data, int length)
}
static void
gst_rmdemux_parse_mdpr (GstRMDemux * rmdemux, const void *data, int length)
gst_rmdemux_parse_mdpr (GstRMDemux * rmdemux, const guint8 * data, int length)
{
GstRMDemuxStream *stream;
char *stream1_type_string;
@ -1679,7 +1679,7 @@ gst_rmdemux_parse_mdpr (GstRMDemux * rmdemux, const void *data, int length)
}
static guint
gst_rmdemux_parse_indx (GstRMDemux * rmdemux, const void *data, int length)
gst_rmdemux_parse_indx (GstRMDemux * rmdemux, const guint8 * data, int length)
{
int n;
int id;
@ -1699,7 +1699,8 @@ gst_rmdemux_parse_indx (GstRMDemux * rmdemux, const void *data, int length)
}
static void
gst_rmdemux_parse_indx_data (GstRMDemux * rmdemux, const void *data, int length)
gst_rmdemux_parse_indx_data (GstRMDemux * rmdemux, const guint8 * data,
int length)
{
int i;
int n;
@ -1726,7 +1727,7 @@ gst_rmdemux_parse_indx_data (GstRMDemux * rmdemux, const void *data, int length)
}
static void
gst_rmdemux_parse_data (GstRMDemux * rmdemux, const void *data, int length)
gst_rmdemux_parse_data (GstRMDemux * rmdemux, const guint8 * data, int length)
{
rmdemux->n_chunks = RMDEMUX_GUINT32_GET (data);
rmdemux->data_offset = RMDEMUX_GUINT32_GET (data + 4);
@ -1736,7 +1737,7 @@ gst_rmdemux_parse_data (GstRMDemux * rmdemux, const void *data, int length)
}
static void
gst_rmdemux_parse_cont (GstRMDemux * rmdemux, const void *data, int length)
gst_rmdemux_parse_cont (GstRMDemux * rmdemux, const guint8 * data, int length)
{
GstTagList *tags;
@ -1901,7 +1902,7 @@ gst_rmdemux_handle_scrambled_packet (GstRMDemux * rmdemux,
}
static GstFlowReturn
gst_rmdemux_parse_packet (GstRMDemux * rmdemux, const void *data,
gst_rmdemux_parse_packet (GstRMDemux * rmdemux, const guint8 * data,
guint16 version, guint16 length)
{
guint16 id;