mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
e77742990d
Attempt to sniff raw mp3 with no id3 tag by looking for a header followed by a second header at the expected offset from the packet length. Adds mp3 sniffing with and without id3 tags to the mediasniffer xpcshell tests. These files are copies of files in content/media/test truncated to 512 bytes. Our method can require up to 1.5k of data, but these have 208/209 byte packets so sniffing still works. notags-bad.mp3 has a corrupt header, and verifies sniffing fails. Attempt to sniff raw mp3 with no id3 tag by looking for a header followed by a second header at the expected offset from the packet length. Adds mp3 sniffing with and without id3 tags to the mediasniffer xpcshell tests. These files are copies of files in content/media/test truncated to 512 bytes. Our method can require up to 1.5k of data, but these have 208/209 byte packets so sniffing still works. notags-bad.mp3 has a corrupt header, and verifies sniffing fails.
16 lines
344 B
C
16 lines
344 B
C
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int mp3_sniff(const uint8_t *buf, long length);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|