summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-20 20:11:06 (UTC)
committer llornkcor <llornkcor>2002-04-20 20:11:06 (UTC)
commit99904a1df601bb5d1c0e6d43a3e04a63fe13cf51 (patch) (unidiff)
tree51ea12679f08c7007bf5367fa4b6cede2d4fc187
parent5d70d17bf478808387cf6e555cc1a65777e6399a (diff)
downloadopie-99904a1df601bb5d1c0e6d43a3e04a63fe13cf51.zip
opie-99904a1df601bb5d1c0e6d43a3e04a63fe13cf51.tar.gz
opie-99904a1df601bb5d1c0e6d43a3e04a63fe13cf51.tar.bz2
removed .mp3 files from using libmpeg
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libmpeg3/libmpeg3.c2
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
@@ -40,65 +40,65 @@ int mpeg3_check_sig(char *path)
40 int result = 0; 40 int result = 0;
41 41
42 fs = mpeg3_new_fs(path); 42 fs = mpeg3_new_fs(path);
43 if(mpeg3io_open_file(fs)) 43 if(mpeg3io_open_file(fs))
44 { 44 {
45/* File not found */ 45/* File not found */
46 return 0; 46 return 0;
47 } 47 }
48 48
49 bits = mpeg3io_read_int32(fs); 49 bits = mpeg3io_read_int32(fs);
50/* Test header */ 50/* Test header */
51 if(bits == MPEG3_TOC_PREFIX || bits == MPEG3_TOC_PREFIXLOWER) 51 if(bits == MPEG3_TOC_PREFIX || bits == MPEG3_TOC_PREFIXLOWER)
52 { 52 {
53 result = 1; 53 result = 1;
54 } 54 }
55 else 55 else
56 if((((bits >> 24) & 0xff) == MPEG3_SYNC_BYTE) || 56 if((((bits >> 24) & 0xff) == MPEG3_SYNC_BYTE) ||
57 (bits == MPEG3_PACK_START_CODE) || 57 (bits == MPEG3_PACK_START_CODE) ||
58 ((bits & 0xfff00000) == 0xfff00000) || 58 ((bits & 0xfff00000) == 0xfff00000) ||
59 (bits == MPEG3_SEQUENCE_START_CODE) || 59 (bits == MPEG3_SEQUENCE_START_CODE) ||
60 (bits == MPEG3_PICTURE_START_CODE) || 60 (bits == MPEG3_PICTURE_START_CODE) ||
61 (((bits & 0xffff0000) >> 16) == MPEG3_AC3_START_CODE) || 61 (((bits & 0xffff0000) >> 16) == MPEG3_AC3_START_CODE) ||
62 ((bits >> 8) == MPEG3_ID3_PREFIX) || 62 ((bits >> 8) == MPEG3_ID3_PREFIX) ||
63 (bits == MPEG3_RIFF_CODE)) 63 (bits == MPEG3_RIFF_CODE))
64 { 64 {
65 result = 1; 65 result = 1;
66 66
67 ext = strrchr(path, '.'); 67 ext = strrchr(path, '.');
68 if(ext) 68 if(ext)
69 { 69 {
70/* Test file extension. */ 70/* Test file extension. */
71 if(strncasecmp(ext, ".mp2", 4) && 71 if(strncasecmp(ext, ".mp2", 4) &&
72 strncasecmp(ext, ".mp3", 4) && 72 // strncasecmp(ext, ".mp3", 4) &&
73 strncasecmp(ext, ".m1v", 4) && 73 strncasecmp(ext, ".m1v", 4) &&
74 strncasecmp(ext, ".m2v", 4) && 74 strncasecmp(ext, ".m2v", 4) &&
75 strncasecmp(ext, ".m2s", 4) && 75 strncasecmp(ext, ".m2s", 4) &&
76 strncasecmp(ext, ".mpg", 4) && 76 strncasecmp(ext, ".mpg", 4) &&
77 strncasecmp(ext, ".vob", 4) && 77 strncasecmp(ext, ".vob", 4) &&
78 strncasecmp(ext, ".mpeg", 4) && 78 strncasecmp(ext, ".mpeg", 4) &&
79 strncasecmp(ext, ".ac3", 4)) 79 strncasecmp(ext, ".ac3", 4))
80 result = 0; 80 result = 0;
81 } 81 }
82 } 82 }
83 83
84 mpeg3io_close_file(fs); 84 mpeg3io_close_file(fs);
85 mpeg3_delete_fs(fs); 85 mpeg3_delete_fs(fs);
86 return result; 86 return result;
87} 87}
88 88
89mpeg3_t* mpeg3_open_copy(char *path, mpeg3_t *old_file) 89mpeg3_t* mpeg3_open_copy(char *path, mpeg3_t *old_file)
90{ 90{
91 mpeg3_t *file = 0; 91 mpeg3_t *file = 0;
92 unsigned int bits; 92 unsigned int bits;
93 int i, done; 93 int i, done;
94 94
95/* Initialize the file structure */ 95/* Initialize the file structure */
96 file = mpeg3_new(path); 96 file = mpeg3_new(path);
97 97
98/* Need to perform authentication before reading a single byte. */ 98/* Need to perform authentication before reading a single byte. */
99 if(mpeg3io_open_file(file->fs)) 99 if(mpeg3io_open_file(file->fs))
100 { 100 {
101 mpeg3_delete(file); 101 mpeg3_delete(file);
102 return 0; 102 return 0;
103 } 103 }
104 104