diff options
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/demux_aiff.c | 15 | ||||
-rw-r--r-- | src/demuxers/demux_asf.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_avi.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_matroska.c | 6 | ||||
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_qt.c | 2 | ||||
-rw-r--r-- | src/demuxers/demux_real.c | 19 | ||||
-rw-r--r-- | src/demuxers/iff.h | 2 |
8 files changed, 30 insertions, 20 deletions
diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c index d3b19701a..51bc624e3 100644 --- a/src/demuxers/demux_aiff.c +++ b/src/demuxers/demux_aiff.c @@ -87,7 +87,6 @@ static int open_aiff_file(demux_aiff_t *this) { unsigned char preamble[PREAMBLE_SIZE]; unsigned int chunk_type; unsigned int chunk_size; - unsigned char buffer[100]; if (_x_demux_read_header(this->input, signature, AIFF_SIGNATURE_SIZE) != AIFF_SIGNATURE_SIZE) return 0; @@ -118,13 +117,15 @@ static int open_aiff_file(demux_aiff_t *this) { chunk_type = _X_BE_32(&preamble[0]); chunk_size = _X_BE_32(&preamble[4]); - if (chunk_size > sizeof(buffer) / sizeof(buffer[0])) { - /* the chunk is too large to fit in the buffer -> this cannot be an aiff chunk */ - this->status = DEMUX_FINISHED; - return 0; - } - if (chunk_type == COMM_TAG) { + unsigned char buffer[100]; + + if (chunk_size > sizeof(buffer) / sizeof(buffer[0])) { + /* the chunk is too large to fit in the buffer -> this cannot be an aiff chunk */ + this->status = DEMUX_FINISHED; + return 0; + } + if (this->input->read(this->input, buffer, chunk_size) != chunk_size) { this->status = DEMUX_FINISHED; diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 156a78d6c..1a97e12bf 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -514,7 +514,7 @@ static int asf_read_header (demux_asf_t *this) { lprintf ("palette_count: %d\n", demux_stream->palette_count); if (demux_stream->palette_count > 256) { - lprintf ("number of colors exceeded 256 (%d)", demux_stream->palette_count); + lprintf ("number of colours exceeded 256 (%d)", demux_stream->palette_count); demux_stream->palette_count = 256; } if ((asf_stream->private_data_length - sizeof(xine_bmiheader) - 11) >= (demux_stream->palette_count * 4)) { diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index ecc71b649..c6a73ebde 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -949,7 +949,7 @@ static avi_t *AVI_init(demux_avi_t *this) { lprintf ("palette_count: %d\n", AVI->palette_count); if (AVI->palette_count > 256) { - lprintf ("number of colors exceeded 256 (%d)", AVI->palette_count); + lprintf ("number of colours exceeded 256 (%d)", AVI->palette_count); AVI->palette_count = 256; } if ((strf_size - sizeof(xine_bmiheader)) >= (AVI->palette_count * 4)) { diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index e976e7d63..4a99492ef 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -779,7 +779,7 @@ static int vobsub_parse_custom_colors(matroska_track_t *t, const char *start) { use_custom_colors = 1; else if (!strncasecmp(start, "OFF", 3) || (*start == '0')) use_custom_colors = 0; - lprintf("VobSub custom colors: %s\n", use_custom_colors ? "ON" : "OFF"); + lprintf("VobSub custom colours: %s\n", use_custom_colors ? "ON" : "OFF"); if ((start = strstr(start, "colors:")) != NULL) { start += 7; while (isspace(*start)) @@ -793,7 +793,7 @@ static int vobsub_parse_custom_colors(matroska_track_t *t, const char *start) { } if (i == 4) { t->sub_track->custom_colors = 4; - lprintf("VobSub colors: %06x,%06x,%06x,%06x\n", t->sub_track->colors[0], + lprintf("VobSub colours: %06x,%06x,%06x,%06x\n", t->sub_track->colors[0], t->sub_track->colors[1], t->sub_track->colors[2], t->sub_track->colors[3]); } @@ -853,7 +853,7 @@ static void init_codec_vobsub(demux_matroska_t *this, things_found |= vobsub_parse_size(track, start); else if (!strncasecmp(start, "palette:", 8)) things_found |= vobsub_parse_palette(track, start); - else if (!strncasecmp(start, "custom colors:", 14)) + else if (!strncasecmp(start, "custom colours:", 14)) things_found |= vobsub_parse_custom_colors(track, start); else if (!strncasecmp(start, "forced subs:", 12)) things_found |= vobsub_parse_forced_subs(track, start); diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index 39d537a4c..27ee7f56b 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.c @@ -805,7 +805,7 @@ static void demux_mpgaudio_send_headers (demux_plugin_t *this_gen) { */ { char scratch_buf[256]; - char *mpeg_ver[3] = {"1", "2", "2.5"}; + static const char mpeg_ver[3][4] = {"1", "2", "2.5"}; snprintf(scratch_buf, 256, "MPEG %s Layer %1d%s", mpeg_ver[this->cur_frame.version_idx], this->cur_frame.layer, diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index a54bc4e73..6b2aa5eea 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -1143,7 +1143,7 @@ static qt_error parse_trak_atom (qt_trak *trak, trak_atom[atom_pos + 0x1], trak_atom[atom_pos + 0x2], trak_atom[atom_pos + 0x3]); - debug_atom_load(" %d RGB colors\n", + debug_atom_load(" %d RGB colours\n", trak->stsd_atoms[k].video.palette_count); for (j = 0; j < trak->stsd_atoms[k].video.palette_count; j++) diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index bd5bb4021..21308bd45 100644 --- a/src/demuxers/demux_real.c +++ b/src/demuxers/demux_real.c @@ -798,8 +798,17 @@ static int demux_real_parse_references( demux_real_t *this) { lprintf("received %d bytes [%s]\n", buf_used, buf); - for(i=0;i<buf_used;i++) { - + if (!strncmp(buf,"http://",7)) + { + for (i = 0; buf[i] && !isspace(buf[i]); ++i) + /**/; + buf[i] = 0; + lprintf("reference [%s] found\n", buf); + + _x_demux_send_mrl_reference (this->stream, 0, buf, NULL, 0, 0); + } + else for (i = 0; i < buf_used; ++i) + { /* "--stop--" is used to have pnm alternative for old real clients * new real clients will stop processing the file and thus use * rtsp protocol. @@ -814,8 +823,8 @@ static int demux_real_parse_references( demux_real_t *this) { if( !strncmp(&buf[i],"-->",3) ) comment = 0; - if( (!strncmp(&buf[i],"pnm://",6) || !strncmp(&buf[i],"rtsp://",7) || - !strncmp(&buf[i],"http://",7)) && !comment ) { + if( (!strncmp(&buf[i],"pnm://",6) || !strncmp(&buf[i],"rtsp://",7)) && + !comment ) { for(j=i; buf[j] && buf[j] != '"' && !isspace(buf[j]); j++ ) ; buf[j]='\0'; @@ -1524,7 +1533,7 @@ static int real_check_stream_type(uint8_t *buf, int len) buf[len] = '\0'; if( strstr(buf,"pnm://") || strstr(buf,"rtsp://") || strstr(buf,"<smil>") || - strstr(buf,"http://") ) + !strncmp(buf,"http://",7) ) return 2; return 0; diff --git a/src/demuxers/iff.h b/src/demuxers/iff.h index 94830f69c..fcfc54f16 100644 --- a/src/demuxers/iff.h +++ b/src/demuxers/iff.h @@ -136,7 +136,7 @@ typedef struct { uint8_t masking; /* masking technique */ uint8_t compression; /* compression algoithm */ uint8_t pad1; /* UNUSED. For consistency, put 0 here. */ - uint16_t transparentColor; /* transparent "color number" */ + uint16_t transparentColor; /* transparent "colour number" */ uint8_t xaspect; /* aspect ratio, a rational number x/y */ uint8_t yaspect; /* aspect ratio, a rational number x/y */ int16_t pagewidth; /* source "page" size in pixels */ |