author | llornkcor <llornkcor> | 2002-04-20 20:11:06 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-20 20:11:06 (UTC) |
commit | 99904a1df601bb5d1c0e6d43a3e04a63fe13cf51 (patch) (side-by-side diff) | |
tree | 51ea12679f08c7007bf5367fa4b6cede2d4fc187 /core | |
parent | 5d70d17bf478808387cf6e555cc1a65777e6399a (diff) | |
download | opie-99904a1df601bb5d1c0e6d43a3e04a63fe13cf51.zip opie-99904a1df601bb5d1c0e6d43a3e04a63fe13cf51.tar.gz opie-99904a1df601bb5d1c0e6d43a3e04a63fe13cf51.tar.bz2 |
removed .mp3 files from using libmpeg
-rw-r--r-- | core/multimedia/opieplayer/libmpeg3/libmpeg3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/libmpeg3/libmpeg3.c b/core/multimedia/opieplayer/libmpeg3/libmpeg3.c index c0fc570..acaecf7 100644 --- a/core/multimedia/opieplayer/libmpeg3/libmpeg3.c +++ b/core/multimedia/opieplayer/libmpeg3/libmpeg3.c @@ -24,97 +24,97 @@ int mpeg3_delete(mpeg3_t *file) for(i = 0; i < file->total_vstreams; i++) mpeg3_delete_vtrack(file, file->vtrack[i]); for(i = 0; i < file->total_astreams; i++) mpeg3_delete_atrack(file, file->atrack[i]); mpeg3_delete_fs(file->fs); mpeg3_delete_demuxer(file->demuxer); free(file); } int mpeg3_check_sig(char *path) { mpeg3_fs_t *fs; unsigned int bits; char *ext; int result = 0; fs = mpeg3_new_fs(path); if(mpeg3io_open_file(fs)) { /* File not found */ return 0; } bits = mpeg3io_read_int32(fs); /* Test header */ if(bits == MPEG3_TOC_PREFIX || bits == MPEG3_TOC_PREFIXLOWER) { result = 1; } else if((((bits >> 24) & 0xff) == MPEG3_SYNC_BYTE) || (bits == MPEG3_PACK_START_CODE) || ((bits & 0xfff00000) == 0xfff00000) || (bits == MPEG3_SEQUENCE_START_CODE) || (bits == MPEG3_PICTURE_START_CODE) || (((bits & 0xffff0000) >> 16) == MPEG3_AC3_START_CODE) || ((bits >> 8) == MPEG3_ID3_PREFIX) || (bits == MPEG3_RIFF_CODE)) { result = 1; ext = strrchr(path, '.'); if(ext) { /* Test file extension. */ if(strncasecmp(ext, ".mp2", 4) && - strncasecmp(ext, ".mp3", 4) && +// strncasecmp(ext, ".mp3", 4) && strncasecmp(ext, ".m1v", 4) && strncasecmp(ext, ".m2v", 4) && strncasecmp(ext, ".m2s", 4) && strncasecmp(ext, ".mpg", 4) && strncasecmp(ext, ".vob", 4) && strncasecmp(ext, ".mpeg", 4) && strncasecmp(ext, ".ac3", 4)) result = 0; } } mpeg3io_close_file(fs); mpeg3_delete_fs(fs); return result; } mpeg3_t* mpeg3_open_copy(char *path, mpeg3_t *old_file) { mpeg3_t *file = 0; unsigned int bits; int i, done; /* Initialize the file structure */ file = mpeg3_new(path); /* Need to perform authentication before reading a single byte. */ if(mpeg3io_open_file(file->fs)) { mpeg3_delete(file); return 0; } /* =============================== Create the title objects ========================= */ bits = mpeg3io_read_int32(file->fs); if(bits == MPEG3_TOC_PREFIX || bits == MPEG3_TOC_PREFIXLOWER) /* TOCV */ { /* Table of contents for another file */ if(mpeg3_read_toc(file)) { mpeg3_delete(file); return 0; } mpeg3io_close_file(file->fs); } else if(((bits >> 24) & 0xff) == MPEG3_SYNC_BYTE) { |