diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index e1a48d2b..1a0cdc47 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -249,6 +249,7 @@ patch_enable_all () enable_oleaut32_x86_64_Marshaller="$1" enable_openal32_EFX_Extension="$1" enable_opengl32_Revert_Disable_Ext="$1" + enable_quartz_AsyncReader="$1" enable_quartz_MediaSeeking_Positions="$1" enable_rasapi32_RasEnumDevicesA="$1" enable_riched20_IText_Interface="$1" @@ -892,6 +893,9 @@ patch_enable () opengl32-Revert_Disable_Ext) enable_opengl32_Revert_Disable_Ext="$2" ;; + quartz-AsyncReader) + enable_quartz_AsyncReader="$2" + ;; quartz-MediaSeeking_Positions) enable_quartz_MediaSeeking_Positions="$2" ;; @@ -5400,6 +5404,20 @@ if test "$enable_opengl32_Revert_Disable_Ext" -eq 1; then ) >> "$patchlist" fi +# Patchset quartz-AsyncReader +# | +# | Modified files: +# | * dlls/quartz/filesource.c, dlls/quartz/regsvr.c +# | +if test "$enable_quartz_AsyncReader" -eq 1; then + patch_apply quartz-AsyncReader/0001-quartz-AsyncReader-should-return-NULL-as-media-subty.patch + patch_apply quartz-AsyncReader/0002-quartz-Recognize-mpeg2-program-streams.patch + ( + echo '+ { "Michael Müller", "quartz: AsyncReader should return NULL as media subtype for unknown formats instead of failing.", 1 },'; + echo '+ { "Michael Müller", "quartz: Recognize mpeg2 program streams.", 1 },'; + ) >> "$patchlist" +fi + # Patchset quartz-MediaSeeking_Positions # | # | Modified files: diff --git a/patches/quartz-AsyncReader/0001-quartz-AsyncReader-should-return-NULL-as-media-subty.patch b/patches/quartz-AsyncReader/0001-quartz-AsyncReader-should-return-NULL-as-media-subty.patch new file mode 100644 index 00000000..328ce625 --- /dev/null +++ b/patches/quartz-AsyncReader/0001-quartz-AsyncReader-should-return-NULL-as-media-subty.patch @@ -0,0 +1,29 @@ +From db3178f4292558456596cc31766480638d8a0f3a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +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 + diff --git a/patches/quartz-AsyncReader/0002-quartz-Recognize-mpeg2-program-streams.patch b/patches/quartz-AsyncReader/0002-quartz-Recognize-mpeg2-program-streams.patch new file mode 100644 index 00000000..b62792cb --- /dev/null +++ b/patches/quartz-AsyncReader/0002-quartz-Recognize-mpeg2-program-streams.patch @@ -0,0 +1,28 @@ +From 6db27add885e521e7b42829ade2f7de74abdd619 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +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 + diff --git a/patches/quartz-AsyncReader/definition b/patches/quartz-AsyncReader/definition new file mode 100644 index 00000000..2973be61 --- /dev/null +++ b/patches/quartz-AsyncReader/definition @@ -0,0 +1 @@ +Fixes: Improve detection of MPEG2 streams