Added patches to improve detection of MPEG2 streams.

This commit is contained in:
Sebastian Lackner
2016-02-07 01:49:06 +01:00
parent 9c77e0bb82
commit 8a350d004c
4 changed files with 76 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
From db3178f4292558456596cc31766480638d8a0f3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 7 Feb 2016 01:30:22 +0100
Subject: quartz: AsyncReader should return NULL as media subtype for unknown
formats instead of failing.
---
dlls/quartz/filesource.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index 33ac442..a62db2c 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -652,8 +652,9 @@ static HRESULT WINAPI FileSource_Load(IFileSourceFilter * iface, LPCOLESTR pszFi
hr = GetClassMediaFile(pReader, pszFileName, &This->pmt->majortype, &This->pmt->subtype, NULL);
if (FAILED(hr))
{
- CoTaskMemFree(This->pmt);
- This->pmt = NULL;
+ memcpy(&This->pmt->majortype, &MEDIATYPE_Stream, sizeof(GUID));
+ memcpy(&This->pmt->subtype, &MEDIASUBTYPE_NULL, sizeof(GUID));
+ hr = S_OK;
}
}
else
--
2.7.0

View File

@@ -0,0 +1,28 @@
From 6db27add885e521e7b42829ade2f7de74abdd619 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 7 Feb 2016 01:32:04 +0100
Subject: quartz: Recognize mpeg2 program streams.
---
dlls/quartz/regsvr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c
index b0f1e9a..196e064 100644
--- a/dlls/quartz/regsvr.c
+++ b/dlls/quartz/regsvr.c
@@ -818,6 +818,11 @@ static struct regsvr_mediatype_parsing const mediatype_parsing_list[] = {
"0, 10, FFFFFF00000080808080, 494433000000000000",
NULL }
},
+ { &MEDIATYPE_Stream,
+ &MEDIASUBTYPE_MPEG2_PROGRAM,
+ { "0, 5, FFFFFFFFC0, 000001BA40",
+ NULL }
+ },
{ &MEDIATYPE_Stream,
&MEDIASUBTYPE_QTMovie,
{ "4, 4, , 6d646174",
--
2.7.0

View File

@@ -0,0 +1 @@
Fixes: Improve detection of MPEG2 streams