summaryrefslogtreecommitdiffstats
path: root/media-plugins/xmms-mad/files/xmms-mad-0.8-mp3-header.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-02 05:23:45 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-02 05:23:45 +0200
commit576b6208d6defe240bfa2477d6dd19f1ed83bfaf (patch)
tree7d54883f16cccc4cbd414398d7fec3c437b36b49 /media-plugins/xmms-mad/files/xmms-mad-0.8-mp3-header.patch
parentfdd6b67a78a966f6a2131de8fe0e539316511083 (diff)
downloaddarklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.gz
darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.bz2
darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.tar.xz
darklin4-576b6208d6defe240bfa2477d6dd19f1ed83bfaf.zip
Cleaned most of outdated stuff
Diffstat (limited to 'media-plugins/xmms-mad/files/xmms-mad-0.8-mp3-header.patch')
-rw-r--r--media-plugins/xmms-mad/files/xmms-mad-0.8-mp3-header.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/media-plugins/xmms-mad/files/xmms-mad-0.8-mp3-header.patch b/media-plugins/xmms-mad/files/xmms-mad-0.8-mp3-header.patch
deleted file mode 100644
index bea8e11..0000000
--- a/media-plugins/xmms-mad/files/xmms-mad-0.8-mp3-header.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -urp xmms-mad-0.8-org/src/xmms-mad.c xmms-mad-0.8/src/xmms-mad.c
---- xmms-mad-0.8-org/src/xmms-mad.c 2005-12-04 23:18:21.000000000 +0200
-+++ xmms-mad-0.8/src/xmms-mad.c 2005-12-04 23:34:53.000000000 +0200
-@@ -76,6 +76,31 @@ xmmsmad_set_eq (int on, float preamp, fl
- //printf("set_eq\n");
- }
-
-+
-+/* Following mp3 header check has been copied from XMMS mp3 input plugin. */
-+static int mpg123_head_check(unsigned char *buffer)
-+{
-+ unsigned int head = (buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3];
-+ if ((head & 0xffe00000) != 0xffe00000)
-+ return FALSE;
-+ if (!((head >> 17) & 3))
-+ return FALSE;
-+ if (((head >> 12) & 0xf) == 0xf)
-+ return FALSE;
-+ if (!((head >> 12) & 0xf))
-+ return FALSE;
-+ if (((head >> 10) & 0x3) == 0x3)
-+ return FALSE;
-+ if (((head >> 19) & 1) == 1 &&
-+ ((head >> 17) & 3) == 3 &&
-+ ((head >> 16) & 1) == 1)
-+ return FALSE;
-+ if ((head & 0xffff0000) == 0xfffe0000)
-+ return FALSE;
-+ return TRUE;
-+}
-+
-+
- static int
- xmmsmad_is_our_file (char *filename)
- {
-@@ -96,9 +121,8 @@ xmmsmad_is_our_file (char *filename)
- fin = open (filename, O_RDONLY);
- if (fin >= 0 && read (fin, check, 4) == 4)
- {
-- /* If first two bytes are a sync header or three bytes are "ID3" */
-- if ( (check[0] == 0xff && (check[1] & 0x70) == 0x70)
-- || memcmp (check, "ID3", 3) == 0)
-+ /* If first 4 bytes are a sync header or three bytes are "ID3" */
-+ if (mpg123_head_check(check) || memcmp (check, "ID3", 3) == 0)
- {
- rtn = 1;
- }