fix for big endian machines. Chunk ID conversion was being swabbed twice.

Original commit message from CVS:
fix for big endian machines.  Chunk ID conversion was being swabbed
twice.
This commit is contained in:
David Schleef 2002-10-10 22:14:54 +00:00
parent bc93903d01
commit a06f00ebb1
2 changed files with 5 additions and 5 deletions

View file

@ -1316,8 +1316,8 @@ gst_avi_demux_process_chunk (GstAviDemux *avi_demux, guint64 *filepos,
stream = &avi_demux->stream[stream_id];
GST_DEBUG (0,"gst_avi_demux_chain: tag found %08x size %08x",
chunkid, *chunksize);
GST_DEBUG (0,"gst_avi_demux_chain: tag found %08x size %08x stream_id %d",
chunkid, *chunksize, stream_id);
format = GST_FORMAT_TIME;
gst_pad_query (stream->pad, GST_PAD_QUERY_POSITION, &format, &next_ts);
@ -1332,7 +1332,7 @@ gst_avi_demux_process_chunk (GstAviDemux *avi_demux, guint64 *filepos,
stream->skip--;
}
else {
if (GST_PAD_IS_CONNECTED (stream->pad)) {
if (stream->pad && GST_PAD_IS_CONNECTED (stream->pad)) {
GstBuffer *buf;
guint32 got_bytes;

View file

@ -46,8 +46,8 @@ extern "C" {
#define GST_AVI_DEMUX_MAX_STREAMS 16
#define CHUNKID_TO_STREAMNR(chunkid) \
(((GUINT32_FROM_BE (chunkid) >> 24) - '0') * 10 + \
((GUINT32_FROM_BE (chunkid) >> 16) & 0xff) - '0')
((((chunkid) & 0xff) - '0') * 10 + \
(((chunkid) >> 8) & 0xff) - '0')
typedef struct _GstAviDemux GstAviDemux;
typedef struct _GstAviDemuxClass GstAviDemuxClass;