Skip to content

Commit a7fc448

Browse files
committed
Fix renderer crash (no subtitles) in MPC-HC 1.7.7
1 parent 8afc6da commit a7fc448

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

detect-renderer.ass

+12-9
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,16 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
144144
; https://github.com/mpc-hc/mpc-hc.git@c818580fc64a3e8cb7891e7dfca45231d5e7b85e coordinates in drawings rounded after scaling
145145
; https://github.com/mpc-hc/mpc-hc.git@dd44bd9d6260d9202d22fffa92f0d266f9d2d34f MPC-HC 1.7.6.36 coordinates in drawings and \pbo rounded to whole pixels after scaling
146146
; https://github.com/mpc-hc/mpc-hc.git@815d90f09e4287735a12e5af44daa85f9b48b770 hexadecimal integers in headers read via wcstoul and hence saturate to ULONG_MAX
147-
; 2.41.191 https://github.com/mpc-hc/mpc-hc.git@ec53662e33610c5c7504427dde3ce7de421d5cb4 MPC-HC 1.7.6.191 drawing parser optimized and broken: /[mnlbspc]*/ immediately following /\S/ (used as cmd) is skipped
147+
; 2.41.190 https://github.com/mpc-hc/mpc-hc.git@fcac68f1e067549562adc0607ba0b6ebbe6ee33e MPC-HC 1.7.6.190 crash on zero-point or invalid vector clips
148+
; 2.41.191 https://github.com/mpc-hc/mpc-hc.git@ec53662e33610c5c7504427dde3ce7de421d5cb4 MPC-HC 1.7.6.191 drawing parser optimized and broken: /[mnlbspc]*/ immediately following /\S/ (used as cmd) is skipped, trailing whitespace in \p drawings causes buffer overread
148149
; 2.41.245 https://github.com/mpc-hc/mpc-hc.git@a74db2a6c1b2e710afbd35abbe0c7271c9651b06 MPC-HC 1.7.6.245 z coordinate limit readded (in display pixels)
149150
; 2.41.55 https://github.com/mpc-hc/mpc-hc.git@11bb014771fcc1f73f4b92c06d29f0662fdda457 MPC-HC 1.7.7.55 opaque boxes not double-scaled
150151
; 2.41.56 https://github.com/mpc-hc/mpc-hc.git@b20e86fad2a5d7729638d772a0a5cd144f9e7189 MPC-HC 1.7.7.56 opaque boxes drawn even if \bord0
152+
; 2.41.114 https://github.com/mpc-hc/mpc-hc.git@76e410ec885d6ec7a51d7e9da0accdf6ed13ec0e MPC-HC 1.7.7.114 fixed crash on zero-point or invalid vector clips
151153
; https://github.com/mpc-hc/mpc-hc.git@a8a5bed7a1ad8680987a82bfa3574cd7d0f963f1 YCbCr Matrix header
152-
; 2.41.141 https://github.com/mpc-hc/mpc-hc.git@b7b2ee8af888639340494783edc5065d8379f797 MPC-HC 1.7.8.141 drawing parser partially fixed: only /[mnlbspc]/ rather than /\S/ recognized as cmd, but /[mnlbspc]*/ still skipped
153-
; 2.41.67 https://github.com/mpc-hc/mpc-hc.git@701ceec81e37de1d9f89ce82ced9bab7735a2eae MPC-HC 1.7.13.67 zero-point vector clips cause NULL dereference
154-
; 2.41.85 https://github.com/mpc-hc/mpc-hc.git@4710d66dff7a2bba5a8091aa2b4abe0323b6f52a MPC-HC 1.7.13.85 zero-point vector clips no longer crash but also no longer do anything
154+
; 2.41.141 https://github.com/mpc-hc/mpc-hc.git@b7b2ee8af888639340494783edc5065d8379f797 MPC-HC 1.7.8.141 drawing parser partially fixed: only /[mnlbspc]/ rather than /\S/ recognized as cmd and no more buffer overread on trailing whitespace in \p drawings, but /[mnlbspc]*/ still skipped
155+
; 2.41.67 https://github.com/mpc-hc/mpc-hc.git@701ceec81e37de1d9f89ce82ced9bab7735a2eae MPC-HC 1.7.13.67 crash on zero-point or invalid vector clips
156+
; 2.41.85 https://github.com/mpc-hc/mpc-hc.git@4710d66dff7a2bba5a8091aa2b4abe0323b6f52a MPC-HC 1.7.13.85 zero-point or invalid vector clips no longer crash but also no longer do anything
155157
; * \beN \t(\be) \blur \iclip \xbord \ybord \xshad \yshad,
156158
; glyph fill excluded from outline if \1a&H00&\2a&H00&\fad(active right now),
157159
; Banner effect position changed when \xbord != 0,
@@ -356,7 +358,7 @@ Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,-144)\fs360\fs-6\cli
356358
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,117)\an8\fs1800\fs-9\fs-9\clip(0,0,0,0)\lalala(\iclip(0,0,0,0))\iclip(m 0 0 l 384.0 0 384 288 0 288)}You are using MPC-HC\N{\1a&HFF&},{\1a}1.7.6.14 to 1.7.6.23,\N{\1a&HFF&}.{\1a}or the corresponding VSFilter.\NYour copy is outdated!
357359
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,144)\clip(m 0 0 l 384 0 !l 0 0 l 384 288 !l 0 0 l 0 288)}You are using MPC-HC\N{\1a&HFF&},{\1a}1.7.6.191 to 1.7.8.140,\N{\1a&HFF&}.{\1a}or the corresponding VSFilter.\NYour copy is outdated!
358360
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,144)\clip(m 0 0 !ln 384 0 384 288 0 288)}You are using MPC-HC\N{\1a&HFF&},{\1a}1.7.8.141 to 1.7.13.66,\N{\1a&HFF&}.{\1a}or the corresponding VSFilter.\NYour copy is outdated!
359-
Dialogue: 0,0:00:00.00,0:00:10.00,Hidden,,0,0,0,,{\pos(192,135)\rBox\c&H009400&\clip(0,0,0,,)\lalala(\fs+0.32e3)}\N\N{\p1}m lm 0 0 l 384.0 0 384 288 0 288{\p0}
361+
Dialogue: 0,0:00:00.00,0:00:10.00,Hidden,,0,0,0,,{\pos(192,135)\rBox\c&H009400&\clip(0,0,0,,)\lalala(\fs+0.32e3)}\N\N{\p1}m 0 0 nl 384.0 0 384 288 0 288{\p0}
360362
; TODO: distinguish xy-VSFilter without support for float in drawings
361363
; TODO: write "xy-VSFilter or XySubFilter" or something to that effect? No, apparently Cyberbeing's official POV is that 3.1 is XySubFilter and 3.0 is xy-VSFilter.
362364
; TODO: find a way to distinguish XySubFilter
@@ -366,16 +368,17 @@ Dialogue: 0,0:00:00.00,0:00:10.00,Hidden,,0,0,0,,{\pos(192,135)\rBox\c&H009400&\
366368
; because events are decoded using standard Win32 API functions.
367369
; TODO: use &H008484& background for latest-but-incorrect xy-VSFilter, XySubFilter and MPC-HC?
368370
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,-144)\clip(0,0,0,0)\org(()\iclip(0,0,0,0))\clip(0,0,0,,)\fscy0.25\p1}m 0 0 m 0 230400{\p0\fscy100}\NYou are using\N{\1a&HFF&},{\1a}xy-VSFilter 3.0.0.301 or newer,\N{\1a&HFF&},{\1a}XySubFilter 3.1.0.698 to 3.1.0.737,\N{\1a&HFF&},{\1a}XySubFilter 3.1.0.753 or newer,\N{\1a&HFF&}.{\1a}or some VSFilter newer than this file.
369-
; Dialogue: 0,0:00:00.00,0:00:10.00,Hidden,,0,0,0,,{\pos(192,144)\rDefault\clip(0,0,0,0)\lalala(\iclip(0,0,0,0))\clip(m lm 0 0 l 384.0 0 384 288 0 288)\fscy3686400\p1}m 0 0 m 0.01{\p0\fscy100}\NYou are using XySubFilter\N{\1a&HFF&}.{\1a}3.1.0.746 or newer.
371+
; Dialogue: 0,0:00:00.00,0:00:10.00,Hidden,,0,0,0,,{\pos(192,144)\rDefault\clip(0,0,0,0)\lalala(\iclip(0,0,0,0))\clip(m 0 0 nl 384.0 0 384 288 0 288)\fscy3686400\p1}m 0 0 m 0.01{\p0\fscy100}\NYou are using XySubFilter\N{\1a&HFF&}.{\1a}3.1.0.746 or newer.
370372
; MPC-HC scales from script to display resolution before rounding, so make sure these are rounded up at as high display resolutions as possible by specifying nextafter(rounded_up, 0).
371373
; Everyone else rounds before scaling.
372374
; Dialogue: 0,0:00:00.00,0:00:10.00,Hidden,,0,0,0,,{\pos(192,-144)\rDefault\lalala(\fscy3686400\p1)}m 0 0 m 0 0.031249999999999997{\p0\fscy100}\NYou are using XySubFilter\N{\1a}.{\1a&H00&}3.1.0.746 or newer.
373375
; Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,-144)\lalala(\fscy3686400\p1)}lm 0 0 lm 0 0.015624999999999998{\p0\fscy100}\NYou are using MPC-HC\N{\1a&HFF&},{\1a}1.7.6.24 to 1.7.6.190{35}{ or to .190 with the display height a multiple of 28*64=18432 pixels},\N{\1a&HFF&}.{\1a}or the corresponding VSFilter.{Green background and no "outdated" message because this version is more correct than the newer one. (But both are bugged due to VSFilterMod and the new tag parser.)}
374376
; Take care to put \fs1440 before \fs- and the broken \org so that Perian sees it and renders this text effectively invisible.
375377
Dialogue: 0,0:00:00.00,0:00:10.00,Hidden,,0,0,0,,{\pos(192,108)\an8\rDefault\fs1440\fs-0.9875e1\org(()\clip(0,0,0,0)))}You are using XySubFilter\N{\1a},{\1a&H00&}3.1.0.746 to 3.1.0.752,\Nor MPC-HC newer than this file\N{\1a}.{\1a&H00&}or the corresponding VSFilter.{Red background.}
376-
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,117)\an8\org(()\clip(0,0,0,0))\fs0.1422e4\clip(m lm 0 0 l 384.0 0 384 288 0 288)}You are using MPC-HC\N{\1a&HFF&},{\1a}1.7.6.24 to 1.7.6.190,\N{\1a&HFF&}.{\1a}or the corresponding VSFilter.{Green background and no "outdated" message because this version is more correct than the newer one. (But both are bugged due to VSFilterMod and the new tag parser.)}
377-
Dialogue: 0,0:00:00.00,0:00:10.00,Box,,0,0,0,,{\pos(0,0)\c&H009400&\clip(m)\p1}m 0 0 l 384 0 384 288 0 288{\p0}
378-
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,144)\clip(m)}You are using MPC-HC 1.7.13.85 or\N{\1a&HFF&}.{\1a}newer, or the corresponding VSFilter.
378+
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,117)\an8\org(()\clip(0,0,0,0))\fs0.1422e4\clip(m 0 0 nl 384.0 0 384 288 0 288)}You are using MPC-HC\N{\1a&HFF&},{\1a}1.7.6.24 to 1.7.6.190,\N{\1a&HFF&}.{\1a}or the corresponding VSFilter.{Green background and no "outdated" message because this version is more correct than the newer one. (But both are bugged due to VSFilterMod and the new tag parser.)}
379+
; Take care to avoid crashing MPC-HC 1.7.6.190 to 1.7.7.113
380+
Dialogue: 0,0:00:00.00,0:00:10.00,Box,,0,0,0,,{\pos(0,0)\c&H009400&\clip(!n 0 0 m 0 0)\p1}m 0 0 l 384 0 384 288 0 288{\p0}
381+
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,144)\clip(!n 0 0 m 0 0)}You are using MPC-HC 1.7.13.85 or\N{\1a&HFF&}.{\1a}newer, or the corresponding VSFilter.
379382
Dialogue: 0,0:00:00.00,0:00:10.00,Box,,0,0,0,,{\pos(0,0)\c&H008484&\1a&HFF&\1va(0,0,0,0)\p1}m 0 0 l 384.0 0 384 288 0 288{\p0}
380383
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,{\pos(192,144)\1a&HFF&\1va(0,0,0,0)\clip(m 0 0 l 384.0 0 384 288 0 288)}You are using SoraYuki’s VSFilterMod\N{\fscy0}.{\fscy}r4+ da27e74 or newer.{Yellowish background because VSFilterMod.}
381384
; TODO: maybe distinguish MPC-HC versions that don't double-scale opaque boxes by showing

0 commit comments

Comments
 (0)