summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_real.c
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 15:42:48 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-07-04 15:42:48 +0200
commitf18dc23c1d5d3b947d43fe18b53d1a0ced918ad6 (patch)
tree8e60ffc15b40b9c730d74bb46caddab8865ab34a /src/demuxers/demux_real.c
parent9c387686faaecae77027f0df541ddaf66fb78897 (diff)
downloadxine-lib-f18dc23c1d5d3b947d43fe18b53d1a0ced918ad6.tar.gz
xine-lib-f18dc23c1d5d3b947d43fe18b53d1a0ced918ad6.tar.bz2
Use the new _x_is_fourcc() funtion to check for FOURCC tags in files.
--HG-- extra : transplant_source : %B5%96xd%99U%EC%7Cr%ABB%A8%26l%08%99L3o%F6
Diffstat (limited to 'src/demuxers/demux_real.c')
-rw-r--r--src/demuxers/demux_real.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index f258fd73a..957cd5caa 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -174,18 +174,6 @@ typedef struct {
demux_class_t demux_class;
} demux_real_class_t;
-static int is_indx_tag(const void *ptr) {
- return memcmp(ptr, "INDX", 4) == 0;
-}
-
-static int is_data_tag(const void *ptr) {
- return memcmp(ptr, "DATA", 4) == 0;
-}
-
-static int is_rmf_tag(const void *ptr) {
- return memcmp(ptr, ".RMF", 4) == 0;
-}
-
static void real_parse_index(demux_real_t *this) {
off_t next_index_chunk = this->index_start;
@@ -208,7 +196,7 @@ static void real_parse_index(demux_real_t *this) {
}
/* Check chunk is actually an index chunk */
- if(!is_indx_tag(&index_chunk_header[0])) {
+ if(!_x_is_fourcc(&index_chunk_header[0], "INDX")) {
lprintf("expected index chunk found chunk type: %.4s\n", &index_chunk_header[0]);
break;
}
@@ -402,7 +390,7 @@ static void real_parse_headers (demux_real_t *this) {
return;
}
- if ( !is_rmf_tag(signature) ) {
+ if ( !_x_is_fourcc(signature, ".RMF") ) {
this->status = DEMUX_FINISHED;
lprintf ("signature not found '%.4s'\n", signature);
return;
@@ -686,7 +674,7 @@ static void real_parse_headers (demux_real_t *this) {
int i;
/* Check for end of the data chunk */
- if (is_indx_tag(&search_buffer[offset]) || is_data_tag(&search_buffer[offset]))
+ if (_x_is_fourcc(&search_buffer[offset], "INDX") || _x_is_fourcc(&search_buffer[offset], "DATA"))
break;
const int stream = _X_BE_16(&search_buffer[offset + 4]);
@@ -1058,7 +1046,7 @@ static int demux_real_send_chunk(demux_plugin_t *this_gen) {
}
/* Check to see if we've gone past the end of the data chunk */
- if (is_indx_tag(&header[0]) || is_data_tag(&header[0])) {
+ if (_x_is_fourcc(&header[0], "INDX") || _x_is_fourcc(&header[0], "DATA")) {
lprintf("finished reading data chunk\n");
this->status = DEMUX_FINISHED;
return this->status;