mfreadwrite/reader: Add m4v format magic.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2022-01-26 13:48:04 +03:00 committed by Alexandre Julliard
parent 1077a5bd99
commit 159e1c5fa4
1 changed files with 2 additions and 0 deletions

View File

@ -2397,6 +2397,7 @@ static HRESULT bytestream_get_url_hint(IMFByteStream *stream, WCHAR const **url)
static const unsigned char isommagic[] = {0x00,0x00,0x00,0x00, 'f', 't', 'y', 'p', 'i', 's', 'o', 'm',0x00,0x00,0x00,0x00};
static const unsigned char mp4_magic[] = {0x00,0x00,0x00,0x00, 'f', 't', 'y', 'p', 'M', 'S', 'N', 'V',0x00,0x00,0x00,0x00};
static const unsigned char mp42magic[] = {0x00,0x00,0x00,0x00, 'f', 't', 'y', 'p', 'm', 'p', '4', '2',0x00,0x00,0x00,0x00};
static const unsigned char mp4vmagic[] = {0x00,0x00,0x00,0x00, 'f', 't', 'y', 'p', 'M', '4', 'V', ' ',0x00,0x00,0x00,0x00};
static const unsigned char mp4mask[] = {0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00};
static const struct stream_content_url_hint
{
@ -2411,6 +2412,7 @@ static HRESULT bytestream_get_url_hint(IMFByteStream *stream, WCHAR const **url)
{ isommagic, L".mp4", mp4mask },
{ mp42magic, L".mp4", mp4mask },
{ mp4_magic, L".mp4", mp4mask },
{ mp4vmagic, L".m4v", mp4mask },
};
unsigned char buffer[4 * sizeof(unsigned int)], pattern[4 * sizeof(unsigned int)];
unsigned int i, j, length = 0, caps = 0;