summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_avi.c22
-rw-r--r--src/demuxers/demux_film.c6
-rw-r--r--src/demuxers/demux_flv.c11
-rw-r--r--src/demuxers/demux_matroska.c25
-rw-r--r--src/demuxers/ebml.c16
5 files changed, 42 insertions, 38 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 3017343bc..635a11aea 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_avi.c,v 1.207 2004/07/04 21:27:23 mroi Exp $
+ * $Id: demux_avi.c,v 1.208 2004/09/17 19:21:33 valtri Exp $
*
* demultiplexer for avi streams
*
@@ -639,9 +639,7 @@ static int idx_grow(demux_avi_t *this, int (*stopper)(demux_avi_t *, void *),
}
}
if (!valid_chunk) {
- xine_log (this->stream->xine, XINE_LOG_MSG,
- _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %lld\n"),
- data[0], data[1], data[2], data[3], chunk_pos);
+ xine_log(this->stream->xine, XINE_LOG_MSG, _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %" PRIiMAX "\n"), data[0], data[1], data[2], data[3], (intmax_t)chunk_pos);
}
chunk_pos = this->input->seek(this->input, this->idx_grow.nexttagoffset, SEEK_SET);
if (chunk_pos != this->idx_grow.nexttagoffset) {
@@ -784,8 +782,7 @@ static avi_t *AVI_init(demux_avi_t *this) {
this->idx_grow.nexttagoffset = this->input->get_current_pos(this->input);
if (this->input->read(this->input, data,8) != 8 ) {
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "failed to read 8 bytes at pos %lld\n",
- this->idx_grow.nexttagoffset);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "failed to read 8 bytes at pos %" PRIiMAX "\n", (intmax_t)this->idx_grow.nexttagoffset);
break; /* We assume it's EOF */
}
@@ -849,9 +846,7 @@ static avi_t *AVI_init(demux_avi_t *this) {
}
}
if (next_chunk != this->input->seek(this->input, next_chunk, SEEK_SET)) {
- xine_log (this->stream->xine, XINE_LOG_MSG,
- _("demux_avi: failed to seek to the next chunk (pos %lld)\n"),
- next_chunk);
+ xine_log (this->stream->xine, XINE_LOG_MSG, _("demux_avi: failed to seek to the next chunk (pos %" PRIiMAX ")\n"), (intmax_t)next_chunk);
break; /* probably slow seek */
}
}
@@ -1691,9 +1686,7 @@ static int get_chunk_header(demux_avi_t *this, uint32_t *len, int *audio_stream)
return AVI_HEADER_AUDIO;
}
}
- xine_log (this->stream->xine, XINE_LOG_MSG,
- _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %lld\n"),
- data[0], data[1], data[2], data[3], this->input->get_current_pos(this->input));
+ xine_log (this->stream->xine, XINE_LOG_MSG, _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %" PRIiMAX "\n"), data[0], data[1], data[2], data[3], (intmax_t)this->input->get_current_pos(this->input));
return AVI_HEADER_UNKNOWN;
}
/* unreachable code */
@@ -2080,8 +2073,9 @@ static int demux_avi_seek_internal (demux_avi_t *this) {
* seek to start pos / time
*/
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
- "start pos is %lld, start time is %d\n",start_pos, start_time);
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ "start pos is %" PRIiMAX ", start time is %d\n", (intmax_t)start_pos,
+ start_time);
/* Seek video. We do a single idx_grow at the beginning rather than
* incrementally growing the index in a loop, so that if the index
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c
index 762c243f2..d7a1b8205 100644
--- a/src/demuxers/demux_film.c
+++ b/src/demuxers/demux_film.c
@@ -21,7 +21,7 @@
* For more information on the FILM file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_film.c,v 1.76 2004/06/13 21:28:52 miguelfreitas Exp $
+ * $Id: demux_film.c,v 1.77 2004/09/17 19:21:34 valtri Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -311,9 +311,9 @@ static int open_film_file(demux_film_t *film) {
if (film->sample_table[j].pts > largest_pts)
largest_pts = film->sample_table[j].pts;
- llprintf(DEBUG_FILM_LOAD, "sample %4d @ %8llX, %8X bytes, %s, pts %lld, duration %lld%s\n",
+ llprintf(DEBUG_FILM_LOAD, "sample %4d @ %8" PRIXMAX ", %8X bytes, %s, pts %lld, duration %lld%s\n",
j,
- film->sample_table[j].sample_offset,
+ (intmax_t)film->sample_table[j].sample_offset,
film->sample_table[j].sample_size,
(film->sample_table[j].audio) ? "audio" : "video",
film->sample_table[j].pts,
diff --git a/src/demuxers/demux_flv.c b/src/demuxers/demux_flv.c
index c9eba89ce..3f09d2b73 100644
--- a/src/demuxers/demux_flv.c
+++ b/src/demuxers/demux_flv.c
@@ -24,7 +24,7 @@
* For more information on the FLV file format, visit:
* http://download.macromedia.com/pub/flash/flash_file_format_specification.pdf
*
- * $Id: demux_flv.c,v 1.3 2004/06/13 21:28:53 miguelfreitas Exp $
+ * $Id: demux_flv.c,v 1.4 2004/09/17 19:21:34 valtri Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -99,7 +99,8 @@ static int open_flv_file(demux_flv_t *this) {
first_offset = BE_32(buffer);
this->input->seek(this->input, first_offset, SEEK_SET);
-printf (" qualified FLV file, repositioned @ offset 0x%llX\n", first_offset);
+ lprintf(" qualified FLV file, repositioned @ offset 0x%" PRIXMAX "\n",
+ (intmax_t)first_offset);
return 1;
}
@@ -114,7 +115,7 @@ static int demux_flv_send_chunk(demux_plugin_t *this_gen) {
unsigned char buffer[12];
-printf (" sending FLV chunk...\n");
+ lprintf (" sending FLV chunk...\n");
this->input->seek(this->input, 4, SEEK_CUR);
if (this->input->read(this->input, buffer, 12) != 12) {
this->status = DEMUX_FINISHED;
@@ -131,8 +132,8 @@ printf (" sending FLV chunk...\n");
/* Flash timestamps are in milliseconds; multiply by 90 to get xine pts */
pts *= 90;
-printf (" chunk_type = %X, 0x%X -1 bytes, pts %lld, sub-type = %X\n",
- chunk_type, remaining_bytes, pts, sub_type);
+ lprintf (" chunk_type = %X, 0x%X -1 bytes, pts %lld, sub-type = %X\n",
+ chunk_type, remaining_bytes, pts, sub_type);
/* only handle the chunk right now if chunk type is 9 and lower nibble
* of sub-type is 2 */
diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c
index e37fc81e3..6df061197 100644
--- a/src/demuxers/demux_matroska.c
+++ b/src/demuxers/demux_matroska.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_matroska.c,v 1.30 2004/08/27 21:07:31 miguelfreitas Exp $
+ * $Id: demux_matroska.c,v 1.31 2004/09/17 19:21:34 valtri Exp $
*
* demultiplexer for matroska streams
*
@@ -1448,8 +1448,9 @@ static int parse_ebml_uint(demux_matroska_t *this, uint8_t *data, uint64_t *num)
}
if (size > 8) {
off_t pos = this->input->get_current_pos(this->input);
- xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
- "demux_matroska: Invalid Track Number at position %llu\n", pos);
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ "demux_matroska: Invalid Track Number at position %" PRIiMAX "\n",
+ (intmax_t)pos);
return 0;
}
@@ -1502,7 +1503,8 @@ static int read_block_data (demux_matroska_t *this, int len) {
if (this->input->read(this->input, this->block_data, len) != len) {
off_t pos = this->input->get_current_pos(this->input);
xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
- "demux_matroska: read error at position %llu\n", pos);
+ "demux_matroska: read error at position %" PRIiMAX "\n",
+ (intmax_t)pos);
return 0;
}
return 1;
@@ -1871,7 +1873,8 @@ static int parse_seek_entry(demux_matroska_t *this) {
this->ebml->level = 1;
if (this->input->seek(this->input, seek_pos, SEEK_SET) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "demux_matroska: failed to seek to pos: %lld\n", seek_pos);
+ "demux_matroska: failed to seek to pos: %" PRIiMAX "\n",
+ (intmax_t)seek_pos);
return 0;
}
if (!parse_top_level_head(this, &next_level))
@@ -1881,12 +1884,14 @@ static int parse_seek_entry(demux_matroska_t *this) {
memcpy(this->ebml, &ebml_bak, sizeof(ebml_parser_t)); /* FIXME */
if (this->input->seek(this->input, current_pos, SEEK_SET) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "demux_matroska: failed to seek to pos: %lld\n", current_pos);
+ "demux_matroska: failed to seek to pos: %" PRIiMAX "\n",
+ (intmax_t)current_pos);
return 0;
}
} else {
xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "demux_matroska: out of stream seek pos: %lld\n", seek_pos);
+ "demux_matroska: out of stream seek pos: %" PRIiMAX "\n",
+ (intmax_t)seek_pos);
}
return 1;
} else {
@@ -2173,7 +2178,8 @@ static void demux_matroska_send_headers (demux_plugin_t *this_gen) {
next_level = 1;
if (this->input->seek(this->input, this->segment.start, SEEK_SET) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "demux_matroska: failed to seek to pos: %lld\n", this->segment.start);
+ "demux_matroska: failed to seek to pos: %" PRIiMAX "\n",
+ (intmax_t)this->segment.start);
this->status = DEMUX_FINISHED;
return;
}
@@ -2192,7 +2198,8 @@ static void demux_matroska_send_headers (demux_plugin_t *this_gen) {
next_level = 1;
if (this->input->seek(this->input, this->segment.start, SEEK_SET) < 0) {
xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
- "demux_matroska: failed to seek to pos: %lld\n", this->segment.start);
+ "demux_matroska: failed to seek to pos: %" PRIiMAX "\n",
+ (intmax_t)this->segment.start);
this->status = DEMUX_FINISHED;
}
}
diff --git a/src/demuxers/ebml.c b/src/demuxers/ebml.c
index b6f0658fc..1fda69b38 100644
--- a/src/demuxers/ebml.c
+++ b/src/demuxers/ebml.c
@@ -20,7 +20,7 @@
* EBML parser
* a lot of ideas from the gstreamer parser
*
- * $Id: ebml.c,v 1.1 2004/01/05 00:40:54 tmattern Exp $
+ * $Id: ebml.c,v 1.2 2004/09/17 19:21:45 valtri Exp $
*
*/
#ifdef HAVE_CONFIG_H
@@ -107,7 +107,8 @@ static int ebml_read_elem_id(ebml_parser_t *ebml, uint32_t *id) {
if (size > 4) {
off_t pos = ebml->input->get_current_pos(ebml->input);
xprintf(ebml->xine, XINE_VERBOSITY_LOG,
- "ebml: invalid EBML ID size (0x%x) at position %llu\n", data[0], pos);
+ "ebml: invalid EBML ID size (0x%x) at position %" PRIiMAX "\n",
+ data[0], (intmax_t)pos);
return 0;
}
@@ -115,7 +116,7 @@ static int ebml_read_elem_id(ebml_parser_t *ebml, uint32_t *id) {
if (ebml->input->read(ebml->input, data + 1, size - 1) != (size - 1)) {
off_t pos = ebml->input->get_current_pos(ebml->input);
xprintf(ebml->xine, XINE_VERBOSITY_LOG,
- "ebml: read error at position %llu\n", pos);
+ "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos);
return 0;
}
for(i = 1; i < size; i++) {
@@ -138,7 +139,7 @@ static int ebml_read_elem_len(ebml_parser_t *ebml, uint64_t *len) {
if (ebml->input->read(ebml->input, data, 1) != 1) {
off_t pos = ebml->input->get_current_pos(ebml->input);
xprintf(ebml->xine, XINE_VERBOSITY_LOG,
- "ebml: read error at position %llu\n", pos);
+ "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos);
return 0;
}
value = data[0];
@@ -151,7 +152,8 @@ static int ebml_read_elem_len(ebml_parser_t *ebml, uint64_t *len) {
if (size > 8) {
off_t pos = ebml->input->get_current_pos(ebml->input);
xprintf(ebml->xine, XINE_VERBOSITY_LOG,
- "ebml: Invalid EBML length size (0x%x) at position %llu\n", data[0], pos);
+ "ebml: Invalid EBML length size (0x%x) at position %" PRIiMAX "\n",
+ data[0], (intmax_t)pos);
return 0;
}
@@ -168,7 +170,7 @@ static int ebml_read_elem_len(ebml_parser_t *ebml, uint64_t *len) {
if (ebml->input->read(ebml->input, data + 1, size - 1) != (size - 1)) {
off_t pos = ebml->input->get_current_pos(ebml->input);
xprintf(ebml->xine, XINE_VERBOSITY_LOG,
- "ebml: read error at position %llu\n", pos);
+ "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos);
return 0;
}
for (i = 1; i < size; i++) {
@@ -191,7 +193,7 @@ static int ebml_read_elem_data(ebml_parser_t *ebml, int8_t *buf, int64_t len) {
if (ebml->input->read(ebml->input, buf, len) != len) {
off_t pos = ebml->input->get_current_pos(ebml->input);
xprintf(ebml->xine, XINE_VERBOSITY_LOG,
- "ebml: read error at position %llu\n", pos);
+ "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos);
return 0;
}