mirror of https://github.com/mpv-player/mpv
Compare commits
12 Commits
e84551daea
...
63e4808c45
Author | SHA1 | Date |
---|---|---|
maxdunbar | 63e4808c45 | |
Kacper Michajłow | 69d70148c7 | |
oficsu | 3ca71b0c0e | |
oficsu | 96b34148f1 | |
nanahi | 93708a9d38 | |
Guido Cella | 2f4c550b4b | |
Kacper Michajłow | fbfc9d22c7 | |
Kacper Michajłow | 47dbc3a74e | |
Kacper Michajłow | 0b234af113 | |
Max | 6dba1b01aa | |
Max | e330a2dbf6 | |
maxdunbar | cd0e2d41c3 |
|
@ -205,6 +205,30 @@ jobs:
|
|||
run: |
|
||||
cat ./build/meson-logs/testlog.txt
|
||||
|
||||
linux-fuzz:
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: "registry.opensuse.org/home/mia/images/images/mpv-ci:stable-deps"
|
||||
env:
|
||||
CC: "clang"
|
||||
CXX: "clang++"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build with meson
|
||||
id: build
|
||||
run: |
|
||||
meson setup build \
|
||||
--werror \
|
||||
-Dc_args="-Wno-error=deprecated -Wno-error=deprecated-declarations" \
|
||||
-Dfuzzers=true -Dlibmpv=true -Dcplayer=false
|
||||
meson compile -C build
|
||||
|
||||
- name: Print meson log
|
||||
if: ${{ failure() && steps.build.outcome == 'failure' }}
|
||||
run: |
|
||||
cat ./build/meson-logs/meson-log.txt
|
||||
|
||||
linux-ffmpeg-4-4:
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
|
|
|
@ -10,6 +10,12 @@
|
|||
To configure this script use file autoload.conf in directory script-opts (the "script-opts"
|
||||
directory must be in the mpv configuration directory, typically ~/.config/mpv/).
|
||||
|
||||
Option `ignore_patterns` is a comma-separated list of patterns (see lua.org/pil/20.2.html).
|
||||
Additionally to the standard lua patterns, you can also escape commas with `%`,
|
||||
for example, the option `bak%,x%,,another` will be resolved as patterns `bak,x,` and `another`.
|
||||
But it does not mean you need to escape all lua patterns twice,
|
||||
so the option `bak%%,%.mp4,` will be resolved as two patterns `bak%%` and `%.mp4`.
|
||||
|
||||
Example configuration would be:
|
||||
|
||||
disabled=no
|
||||
|
@ -22,6 +28,7 @@ additional_audio_exts=list,of,ext
|
|||
ignore_hidden=yes
|
||||
same_type=yes
|
||||
directory_mode=recursive
|
||||
ignore_patterns=^~,^bak-,%.bak$
|
||||
|
||||
--]]
|
||||
|
||||
|
@ -42,7 +49,8 @@ o = {
|
|||
additional_audio_exts = "",
|
||||
ignore_hidden = true,
|
||||
same_type = false,
|
||||
directory_mode = "auto"
|
||||
directory_mode = "auto",
|
||||
ignore_patterns = ""
|
||||
}
|
||||
options.read_options(o, nil, function(list)
|
||||
split_option_exts(list.additional_video_exts, list.additional_audio_exts, list.additional_image_exts)
|
||||
|
@ -67,9 +75,45 @@ function SetUnion (a,b)
|
|||
return a
|
||||
end
|
||||
|
||||
function Split (s)
|
||||
-- Returns first and last positions in string or past-to-end indices
|
||||
function FindOrPastTheEnd (string, pattern, start_at)
|
||||
local pos1, pos2 = string.find(string, pattern, start_at)
|
||||
return pos1 or #string + 1,
|
||||
pos2 or #string + 1
|
||||
end
|
||||
|
||||
function Split (list)
|
||||
local set = {}
|
||||
for v in string.gmatch(s, '([^,]+)') do set[v] = true end
|
||||
|
||||
local item_pos = 1
|
||||
local item = ""
|
||||
|
||||
while item_pos <= #list do
|
||||
local pos1, pos2 = FindOrPastTheEnd(list, "%%*,", item_pos)
|
||||
|
||||
local pattern_length = pos2 - pos1
|
||||
local is_comma_escaped = pattern_length % 2
|
||||
|
||||
local pos_before_escape = pos1 - 1
|
||||
local item_escape_count = pattern_length - is_comma_escaped
|
||||
|
||||
item = item .. string.sub(list, item_pos, pos_before_escape + item_escape_count)
|
||||
|
||||
if is_comma_escaped == 1 then
|
||||
item = item .. ","
|
||||
else
|
||||
set[item] = true
|
||||
item = ""
|
||||
end
|
||||
|
||||
item_pos = pos2 + 1
|
||||
end
|
||||
|
||||
set[item] = true
|
||||
|
||||
-- exclude empty items
|
||||
set[""] = nil
|
||||
|
||||
return set
|
||||
end
|
||||
|
||||
|
@ -95,6 +139,11 @@ function split_option_exts(video, audio, image)
|
|||
end
|
||||
split_option_exts(true, true, true)
|
||||
|
||||
function split_patterns()
|
||||
o.ignore_patterns = Split(o.ignore_patterns)
|
||||
end
|
||||
split_patterns()
|
||||
|
||||
function create_extensions()
|
||||
EXTENSIONS = {}
|
||||
EXTENSIONS_VIDEO = {}
|
||||
|
@ -139,6 +188,16 @@ function get_extension(path)
|
|||
end
|
||||
end
|
||||
|
||||
function is_ignored(file)
|
||||
for pattern, _ in pairs(o.ignore_patterns) do
|
||||
if string.match(file, pattern) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
table.filter = function(t, iter)
|
||||
for i = #t, 1, -1 do
|
||||
if not iter(t[i]) then
|
||||
|
@ -189,9 +248,14 @@ function scan_dir(path, current_file, dir_mode, separator, dir_depth, total_file
|
|||
table.filter(files, function (v)
|
||||
-- The current file could be a hidden file, ignoring it doesn't load other
|
||||
-- files from the current directory.
|
||||
if (o.ignore_hidden and not (prefix .. v == current_file) and string.match(v, "^%.")) then
|
||||
local current = prefix .. v == current_file
|
||||
if o.ignore_hidden and not current and string.match(v, "^%.") then
|
||||
return false
|
||||
end
|
||||
if not current and is_ignored(v) then
|
||||
return false
|
||||
end
|
||||
|
||||
local ext = get_extension(v)
|
||||
if ext == nil then
|
||||
return false
|
||||
|
|
|
@ -7,169 +7,112 @@
|
|||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>AAC</string>
|
||||
<string>AC3</string>
|
||||
<string>AIFF</string>
|
||||
<string>M4A</string>
|
||||
<string>MKA</string>
|
||||
<string>MP3</string>
|
||||
<string>OGG</string>
|
||||
<string>PCM</string>
|
||||
<string>VAW</string>
|
||||
<string>WAV</string>
|
||||
<string>WAW</string>
|
||||
<string>WMA</string>
|
||||
<string>aac</string>
|
||||
<string>ac3</string>
|
||||
<string>aiff</string>
|
||||
<string>m4a</string>
|
||||
<string>mka</string>
|
||||
<string>mp3</string>
|
||||
<string>ogg</string>
|
||||
<string>pcm</string>
|
||||
<string>vaw</string>
|
||||
<string>wav</string>
|
||||
<string>waw</string>
|
||||
<string>wma</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Audio file</string>
|
||||
<string>Audio File</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.aac-audio</string>
|
||||
<string>public.ac3-audio</string>
|
||||
<string>public.aiff-audio</string>
|
||||
<string>public.mpeg-4-audio</string>
|
||||
<string>org.matroska.mka</string>
|
||||
<string>public.mp3</string>
|
||||
<string>org.xiph.ogg-audio</string>
|
||||
<string>io.mpv.pcm</string>
|
||||
<string>com.microsoft.waveform-audio</string>
|
||||
<string>com.microsoft.windows-media-wma</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Movie File</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>*</string>
|
||||
<string>*</string>
|
||||
<string>3GP</string>
|
||||
<string>3IV</string>
|
||||
<string>3gp</string>
|
||||
<string>3iv</string>
|
||||
<string>ASF</string>
|
||||
<string>AVI</string>
|
||||
<string>public.avi</string>
|
||||
<string>CPK</string>
|
||||
<string>DAT</string>
|
||||
<string>DIVX</string>
|
||||
<string>DV</string>
|
||||
<string>FLAC</string>
|
||||
<string>io.mpv.divx</string>
|
||||
<string>io.mpv.dts</string>
|
||||
<string>public.dv-movie</string>
|
||||
<string>org.xiph.flac</string>
|
||||
<string>FLI</string>
|
||||
<string>FLV</string>
|
||||
<string>H264</string>
|
||||
<string>com.adobe.flash.video</string>
|
||||
<string>io.mpv.h264</string>
|
||||
<string>io.mpv.hevc</string>
|
||||
<string>I263</string>
|
||||
<string>M2TS</string>
|
||||
<string>M4V</string>
|
||||
<string>MKV</string>
|
||||
<string>MOV</string>
|
||||
<string>MP2</string>
|
||||
<string>MP4</string>
|
||||
<string>MPEG</string>
|
||||
<string>MPG</string>
|
||||
<string>MPG2</string>
|
||||
<string>MPG4</string>
|
||||
<string>NSV</string>
|
||||
<string>io.mpv.mts</string>
|
||||
<string>com.apple.m4v-video</string>
|
||||
<string>org.matroska.mkv</string>
|
||||
<string>com.apple.quicktime-movie</string>
|
||||
<string>public.mp2</string>
|
||||
<string>public.mpeg-4</string>
|
||||
<string>public.mpeg</string>
|
||||
<string>public.mpeg-2-video</string>
|
||||
<string>io.mpv.nsv</string>
|
||||
<string>NUT</string>
|
||||
<string>NUV</string>
|
||||
<string>OGG</string>
|
||||
<string>OGM</string>
|
||||
<string>QT</string>
|
||||
<string>RM</string>
|
||||
<string>RMVB</string>
|
||||
<string>io.mpv.nuv</string>
|
||||
<string>org.xiph.ogg-video</string>
|
||||
<string>com.real.realmedia</string>
|
||||
<string>VCD</string>
|
||||
<string>VFW</string>
|
||||
<string>VOB</string>
|
||||
<string>WEBM</string>
|
||||
<string>WMV</string>
|
||||
<string>MK3D</string>
|
||||
<string>asf</string>
|
||||
<string>avi</string>
|
||||
<string>cpk</string>
|
||||
<string>dat</string>
|
||||
<string>divx</string>
|
||||
<string>dv</string>
|
||||
<string>flac</string>
|
||||
<string>fli</string>
|
||||
<string>flv</string>
|
||||
<string>h264</string>
|
||||
<string>i263</string>
|
||||
<string>m2ts</string>
|
||||
<string>m4v</string>
|
||||
<string>mkv</string>
|
||||
<string>mov</string>
|
||||
<string>mp2</string>
|
||||
<string>mp4</string>
|
||||
<string>mpeg</string>
|
||||
<string>mpg</string>
|
||||
<string>mpg2</string>
|
||||
<string>mpg4</string>
|
||||
<string>nsv</string>
|
||||
<string>nut</string>
|
||||
<string>nuv</string>
|
||||
<string>ogg</string>
|
||||
<string>ogm</string>
|
||||
<string>qt</string>
|
||||
<string>rm</string>
|
||||
<string>rmvb</string>
|
||||
<string>vcd</string>
|
||||
<string>vfw</string>
|
||||
<string>vob</string>
|
||||
<string>webm</string>
|
||||
<string>wmv</string>
|
||||
<string>mk3d</string>
|
||||
<string>io.mpv.vob</string>
|
||||
<string>io.mpv.webm</string>
|
||||
<string>io.mpv.wmv</string>
|
||||
<string>io.mpv.mk3d</string>
|
||||
<string>io.mpv.xvid</string>
|
||||
<string>io.mpv.y4m</string>
|
||||
<string>io.mpv.yuv</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Movie file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>AQT</string>
|
||||
<string>ASS</string>
|
||||
<string>JSS</string>
|
||||
<string>RT</string>
|
||||
<string>SMI</string>
|
||||
<string>SRT</string>
|
||||
<string>SSA</string>
|
||||
<string>SUB</string>
|
||||
<string>TXT</string>
|
||||
<string>UTF</string>
|
||||
<string>aqt</string>
|
||||
<string>ass</string>
|
||||
<string>jss</string>
|
||||
<string>rt</string>
|
||||
<string>smi</string>
|
||||
<string>srt</string>
|
||||
<string>ssa</string>
|
||||
<string>sub</string>
|
||||
<string>txt</string>
|
||||
<string>utf</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Subtitles file</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<false/>
|
||||
<key>NSPersistentStoreTypeKey</key>
|
||||
<string>XML</string>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>AQT</string>
|
||||
<string>io.mpv.ass</string>
|
||||
<string>JSS</string>
|
||||
<string>RT</string>
|
||||
<string>io.mpv.smi</string>
|
||||
<string>io.mpv.subrip</string>
|
||||
<string>io.mpv.sub</string>
|
||||
<string>io.mpv.vobsub</string>
|
||||
<string>public.plain-text</string>
|
||||
<string>UTF</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
@ -202,6 +145,8 @@
|
|||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>mpv Custom Protocol</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
|
@ -212,6 +157,8 @@
|
|||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>Streaming Protocol</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
|
@ -233,6 +180,8 @@
|
|||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>LSHandlerRank</key>
|
||||
<string>Default</string>
|
||||
<key>CFBundleURLName</key>
|
||||
<string>CD/DVD/Bluray Media</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
|
@ -256,7 +205,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.ac3</string>
|
||||
<string>public.ac3-audio</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://wiki.multimedia.cx/index.php?title=AC3</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -267,6 +216,11 @@
|
|||
<string>a52</string>
|
||||
<string>eac3</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/ac3</string>
|
||||
<string>audio/eac3</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -288,6 +242,10 @@
|
|||
<array>
|
||||
<string>dts</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/vnd.dts</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -300,7 +258,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.flac</string>
|
||||
<string>org.xiph.flac</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://flac.sourceforge.net/format.html</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -309,6 +267,10 @@
|
|||
<array>
|
||||
<string>flac</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/flac</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -321,7 +283,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.mka</string>
|
||||
<string>org.matroska.mka</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://www.matroska.org</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -330,6 +292,10 @@
|
|||
<array>
|
||||
<string>mka</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/matroska</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -342,7 +308,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.ogg-audio</string>
|
||||
<string>org.xiph.ogg-audio</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://xiph.org/ogg</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -351,6 +317,10 @@
|
|||
<array>
|
||||
<string>ogg</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/ogg</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -372,6 +342,35 @@
|
|||
<array>
|
||||
<string>pcm</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.audio</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>Waveform Audio</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.microsoft.waveform-audio</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>https://en.wikipedia.org/wiki/WAV</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>wav</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/wav</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -384,7 +383,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.wma</string>
|
||||
<string>com.microsoft.windows-media-wma</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://en.wikipedia.org/wiki/Windows_Media_Audio</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -393,6 +392,10 @@
|
|||
<array>
|
||||
<string>wma</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>audio/x-ms-wma</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -405,7 +408,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.avi</string>
|
||||
<string>public.avi</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://www.the-labs.com/Video/odmlff2-avidef.pdf</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -414,6 +417,10 @@
|
|||
<array>
|
||||
<string>avi</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/x-msvideo</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -435,6 +442,10 @@
|
|||
<array>
|
||||
<string>divx</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/divx</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -447,7 +458,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.dv</string>
|
||||
<string>public.dv-movie</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://en.wikipedia.org/wiki/DV</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -457,6 +468,10 @@
|
|||
<string>dv</string>
|
||||
<string>hdv</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/dv</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -469,7 +484,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.flv</string>
|
||||
<string>com.adobe.flash.video</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://en.wikipedia.org/wiki/Flash_Video</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -477,10 +492,17 @@
|
|||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>flv</string>
|
||||
<string>fla</string>
|
||||
<string>f4a</string>
|
||||
<string>f4v</string>
|
||||
<string>f4b</string>
|
||||
<string>f4p</string>
|
||||
<string>swf</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>application/vnd.adobe.flash.movie</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -507,6 +529,35 @@
|
|||
<string>mtv</string>
|
||||
<string>ts</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>model/vnd.mts</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.movie</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>MPEG-4 File</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.apple.m4v-video</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>https://en.wikipedia.org/wiki/M4V</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>m4v</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/m4v</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -519,7 +570,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.mkv</string>
|
||||
<string>org.matroska.mkv</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://www.matroska.org</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -528,6 +579,10 @@
|
|||
<array>
|
||||
<string>mkv</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/matroska</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -549,6 +604,10 @@
|
|||
<array>
|
||||
<string>mk3d</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>application/x-matroska</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -570,6 +629,10 @@
|
|||
<array>
|
||||
<string>webm</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/webm</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -582,7 +645,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.ogv</string>
|
||||
<string>org.xiph.ogg-video</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://xiph.org/ogg</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -592,6 +655,10 @@
|
|||
<string>ogm</string>
|
||||
<string>ogv</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/ogg</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -604,7 +671,7 @@
|
|||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.rmvb</string>
|
||||
<string>com.real.realmedia</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://www.real.com</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
|
@ -614,6 +681,60 @@
|
|||
<string>rmvb</string>
|
||||
<string>rm</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>application/vnd.rn-realmedia-vbr</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.movie</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>Nullsoft Streaming Video</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.nsv</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>https://en.wikipedia.org/wiki/Nullsoft</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>nsv</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>application/x-winamp</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.movie</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>NuppleVideo File</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>document.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>io.mpv.nuv</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>https://en.wikipedia.org/wiki/Nullsoft</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>nuv</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string></string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -635,6 +756,10 @@
|
|||
<array>
|
||||
<string>vob</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/x-ms-vob</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -656,6 +781,10 @@
|
|||
<array>
|
||||
<string>wmv</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/x-ms-wmv</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -677,6 +806,10 @@
|
|||
<array>
|
||||
<string>xvid</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/x-xvid</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -698,6 +831,10 @@
|
|||
<array>
|
||||
<string>264</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>video/H264</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -719,6 +856,10 @@
|
|||
<array>
|
||||
<string>hevc</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string></string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -740,6 +881,10 @@
|
|||
<array>
|
||||
<string>yuv</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string></string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -782,6 +927,10 @@
|
|||
<array>
|
||||
<string>srt</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>application/x-subrip</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -803,6 +952,10 @@
|
|||
<array>
|
||||
<string>sub</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>text/plain</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -825,6 +978,10 @@
|
|||
<string>ass</string>
|
||||
<string>ssa</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>text/plain</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -847,6 +1004,10 @@
|
|||
<string>idx</string>
|
||||
<string>sub</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>text/plain</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
@ -869,6 +1030,10 @@
|
|||
<string>smi</string>
|
||||
<string>smil</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>application/smil</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
|
|
|
@ -101,7 +101,7 @@ function _mpv_generate_arguments {
|
|||
|
||||
entry+='->files'
|
||||
|
||||
elif [[ $name == (ao|vo|af|vf|profile|audio-device|vulkan-device) ]]; then
|
||||
elif [[ $desc = 'Object settings list'* || $name == (profile|audio-device|vulkan-device) ]]; then
|
||||
|
||||
entry+="->parse-help-$name"
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* This file is part of mpv.
|
||||
*
|
||||
* mpv is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* mpv is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MPV_STRINGIFY_(X) #X
|
||||
#define MPV_STRINGIFY(X) MPV_STRINGIFY_(X)
|
||||
|
||||
static inline void check_error(int status)
|
||||
{
|
||||
if (status < 0) {
|
||||
fprintf(stderr, "mpv API error: %s\n", mpv_error_string(status));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool str_startswith(const char *str, size_t str_len,
|
||||
const char *prefix, size_t prefix_len)
|
||||
{
|
||||
if (str_len < prefix_len)
|
||||
return false;
|
||||
return !memcmp(str, prefix, prefix_len);
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* This file is part of mpv.
|
||||
*
|
||||
* mpv is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* mpv is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return -1;
|
||||
|
||||
char filename[15 + 10 + 1];
|
||||
sprintf(filename, "/tmp/libfuzzer.%d", getpid());
|
||||
|
||||
FILE *fp = fopen(filename, "wb");
|
||||
if (!fp)
|
||||
exit(1);
|
||||
|
||||
if (fwrite(data, size, 1, fp) != 1)
|
||||
exit(1);
|
||||
|
||||
if (fclose(fp))
|
||||
exit(1);
|
||||
|
||||
mpv_handle *ctx = mpv_create();
|
||||
if (!ctx)
|
||||
exit(1);
|
||||
|
||||
check_error(mpv_set_option_string(ctx, "vo", "null"));
|
||||
check_error(mpv_set_option_string(ctx, "ao", "null"));
|
||||
check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes"));
|
||||
check_error(mpv_set_option_string(ctx, "untimed", "yes"));
|
||||
check_error(mpv_set_option_string(ctx, "video-osd", "no"));
|
||||
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
|
||||
|
||||
check_error(mpv_initialize(ctx));
|
||||
|
||||
const char *cmd[] = {"loadfile", filename, NULL};
|
||||
check_error(mpv_command(ctx, cmd));
|
||||
|
||||
while (1) {
|
||||
mpv_event *event = mpv_wait_event(ctx, 10000);
|
||||
if (event->event_id == MPV_EVENT_IDLE)
|
||||
break;
|
||||
}
|
||||
|
||||
mpv_terminate_destroy(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* This file is part of mpv.
|
||||
*
|
||||
* mpv is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* mpv is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
{
|
||||
if (size <= 1 || data[size - 1] != '\0')
|
||||
return -1;
|
||||
|
||||
// Exlude data with null bytes inside
|
||||
if (strlen(data) != size - 1)
|
||||
return -1;
|
||||
|
||||
#ifdef MPV_PROTO
|
||||
if (!str_startswith(data, size - 1, MPV_STRINGIFY(MPV_PROTO) "://", strlen(MPV_STRINGIFY(MPV_PROTO) "://")))
|
||||
return -1;
|
||||
#else
|
||||
// Exclude some common paths that are not useful for testing.
|
||||
// Exclude -
|
||||
if (size == 2 && !strncmp(data, "-", 1))
|
||||
return -1;
|
||||
// Exclude relative paths
|
||||
if (str_startswith(data, size - 1, ".", 1))
|
||||
return -1;
|
||||
// Exclude absolute paths
|
||||
if (str_startswith(data, size - 1, "/", 1))
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
mpv_handle *ctx = mpv_create();
|
||||
if (!ctx)
|
||||
exit(1);
|
||||
|
||||
check_error(mpv_set_option_string(ctx, "vo", "null"));
|
||||
check_error(mpv_set_option_string(ctx, "ao", "null"));
|
||||
check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes"));
|
||||
check_error(mpv_set_option_string(ctx, "untimed", "yes"));
|
||||
check_error(mpv_set_option_string(ctx, "video-osd", "no"));
|
||||
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
|
||||
|
||||
check_error(mpv_initialize(ctx));
|
||||
|
||||
const char *cmd[] = {"loadfile", data, NULL};
|
||||
check_error(mpv_command(ctx, cmd));
|
||||
|
||||
while (1) {
|
||||
mpv_event *event = mpv_wait_event(ctx, 10000);
|
||||
if (event->event_id == MPV_EVENT_IDLE)
|
||||
break;
|
||||
}
|
||||
|
||||
mpv_terminate_destroy(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* This file is part of mpv.
|
||||
*
|
||||
* mpv is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* mpv is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libmpv/client.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
{
|
||||
size_t value_len;
|
||||
switch (MPV_FORMAT)
|
||||
{
|
||||
case MPV_FORMAT_STRING:
|
||||
value_len = strnlen(data, size);
|
||||
if (!value_len || value_len == size)
|
||||
return -1;
|
||||
value_len += 1;
|
||||
break;
|
||||
case MPV_FORMAT_FLAG:
|
||||
value_len = sizeof(int);
|
||||
break;
|
||||
case MPV_FORMAT_INT64:
|
||||
value_len = sizeof(int64_t);
|
||||
break;
|
||||
case MPV_FORMAT_DOUBLE:
|
||||
value_len = sizeof(double);
|
||||
break;
|
||||
default:
|
||||
exit(1);
|
||||
break;
|
||||
}
|
||||
|
||||
// at least two bytes for the name
|
||||
if (size < value_len + 2)
|
||||
return -1;
|
||||
|
||||
const char *name = (const char *)data + value_len;
|
||||
size_t name_len = strnlen(name, size - value_len);
|
||||
if (!name_len || name_len != size - value_len - 1)
|
||||
return -1;
|
||||
|
||||
mpv_handle *ctx = mpv_create();
|
||||
if (!ctx)
|
||||
exit(1);
|
||||
|
||||
#if MPV_RUN
|
||||
check_error(mpv_set_option_string(ctx, "vo", "null"));
|
||||
check_error(mpv_set_option_string(ctx, "ao", "null"));
|
||||
check_error(mpv_set_option_string(ctx, "ao-null-untimed", "yes"));
|
||||
check_error(mpv_set_option_string(ctx, "untimed", "yes"));
|
||||
check_error(mpv_set_option_string(ctx, "video-osd", "no"));
|
||||
check_error(mpv_set_option_string(ctx, "msg-level", "all=trace"));
|
||||
|
||||
check_error(mpv_initialize(ctx));
|
||||
#endif
|
||||
|
||||
const void *value = data;
|
||||
mpv_set_property(ctx, name, MPV_FORMAT, &value);
|
||||
|
||||
#if MPV_RUN
|
||||
check_error(mpv_set_option_string(ctx, "audio-files", "av://lavfi:sine=d=0.1"));
|
||||
const char *cmd[] = {"loadfile", "av://lavfi:yuvtestsrc=d=0.1", NULL};
|
||||
check_error(mpv_command(ctx, cmd));
|
||||
|
||||
while (1) {
|
||||
mpv_event *event = mpv_wait_event(ctx, 10000);
|
||||
if (event->event_id == MPV_EVENT_IDLE)
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
mpv_terminate_destroy(ctx);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
incdir = include_directories('../')
|
||||
|
||||
executable('fuzzer_loadfile', 'fuzzer_loadfile.c',
|
||||
include_directories: incdir, link_with: libmpv)
|
||||
executable('fuzzer_loadfile_direct', 'fuzzer_loadfile_direct.c',
|
||||
include_directories: incdir, link_with: libmpv)
|
||||
|
||||
foreach p : ['bd', 'cdda', 'dvb', 'dvd', 'edl', 'file', 'hex', 'lavf', 'memory',
|
||||
'mf', 'slice', 'smb']
|
||||
executable('fuzzer_protocol_' + p,
|
||||
'fuzzer_loadfile_direct.c',
|
||||
c_args: ['-DMPV_PROTO=' + p],
|
||||
include_directories: incdir,
|
||||
link_with: libmpv)
|
||||
endforeach
|
||||
|
||||
|
||||
foreach f : ['MPV_FORMAT_STRING', 'MPV_FORMAT_FLAG', 'MPV_FORMAT_INT64', 'MPV_FORMAT_DOUBLE']
|
||||
foreach i : ['0', '1']
|
||||
executable('fuzzer_set_property_' + f + '_' + i,
|
||||
'fuzzer_set_property.c',
|
||||
c_args: ['-DMPV_FORMAT=' + f, '-DMPV_RUN=' + i],
|
||||
include_directories: incdir,
|
||||
link_with: libmpv)
|
||||
endforeach
|
||||
endforeach
|
13
meson.build
13
meson.build
|
@ -379,6 +379,15 @@ pthread_debug = get_option('pthread-debug').require(
|
|||
)
|
||||
features += {'pthread-debug': pthread_debug.allowed()}
|
||||
|
||||
if get_option('fuzzers')
|
||||
if get_option('cplayer') or not get_option('libmpv')
|
||||
error('fuzzers require !cplayer and libmpv')
|
||||
endif
|
||||
# Adding flags manually until https://github.com/mesonbuild/meson/pull/9825
|
||||
flags += ['-fsanitize=address,undefined,fuzzer', '-fno-omit-frame-pointer']
|
||||
link_flags += ['-fsanitize=address,undefined,fuzzer', '-fno-omit-frame-pointer']
|
||||
endif
|
||||
|
||||
add_project_arguments(flags, language: 'c')
|
||||
add_project_arguments(['-Wno-unused-parameter'], language: 'objc')
|
||||
add_project_link_arguments(link_flags, language: ['c', 'objc'])
|
||||
|
@ -1803,6 +1812,10 @@ if get_option('tests')
|
|||
subdir('test')
|
||||
endif
|
||||
|
||||
if get_option('fuzzers')
|
||||
subdir('fuzzers')
|
||||
endif
|
||||
|
||||
summary({'d3d11': features['d3d11'],
|
||||
'javascript': features['javascript'],
|
||||
'libmpv': get_option('libmpv'),
|
||||
|
|
|
@ -4,6 +4,7 @@ option('cplayer', type: 'boolean', value: true, description: 'mpv CLI player')
|
|||
option('libmpv', type: 'boolean', value: false, description: 'libmpv library')
|
||||
option('build-date', type: 'boolean', value: true, description: 'include compile timestamp in binary')
|
||||
option('tests', type: 'boolean', value: false, description: 'meson unit tests')
|
||||
option('fuzzers', type: 'boolean', value: false, description: 'fuzzer binaries')
|
||||
# Reminder: normally always built, but enabled by MPV_LEAK_REPORT.
|
||||
# Building it can be disabled only by defining NDEBUG through CFLAGS.
|
||||
option('ta-leak-report', type: 'boolean', value: false, description: 'enable ta leak report by default (development only)')
|
||||
|
|
|
@ -4062,8 +4062,7 @@ static const struct m_property mp_properties_base[] = {
|
|||
.priv = (void *)&(const int[]){0, SD_TEXT_TYPE_PLAIN}},
|
||||
{"secondary-sub-text", mp_property_sub_text,
|
||||
.priv = (void *)&(const int[]){1, SD_TEXT_TYPE_PLAIN}},
|
||||
{"sub-text-ass", mp_property_sub_text,
|
||||
.priv = (void *)&(const int[]){0, SD_TEXT_TYPE_ASS}},
|
||||
M_PROPERTY_DEPRECATED_ALIAS("sub-text-ass", "sub-text/ass"),
|
||||
{"sub-start", mp_property_sub_start,
|
||||
.priv = (void *)&(const int){0}},
|
||||
{"secondary-sub-start", mp_property_sub_start,
|
||||
|
|
|
@ -2182,11 +2182,17 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg)
|
|||
} else if (changed_option == &vo_opts->cursor_passthrough) {
|
||||
update_cursor_passthrough(w32);
|
||||
} else if (changed_option == &vo_opts->border ||
|
||||
changed_option == &vo_opts->title_bar ||
|
||||
changed_option == &vo_opts->show_in_taskbar)
|
||||
changed_option == &vo_opts->title_bar)
|
||||
{
|
||||
update_window_style(w32);
|
||||
update_window_state(w32);
|
||||
} else if (changed_option == &vo_opts->show_in_taskbar) {
|
||||
// This hide and show is apparently required according to the documentation:
|
||||
// https://learn.microsoft.com/en-us/windows/win32/shell/taskbar#managing-taskbar-buttons
|
||||
ShowWindow(w32->window, SW_HIDE);
|
||||
update_window_style(w32);
|
||||
ShowWindow(w32->window, SW_SHOW);
|
||||
update_window_state(w32);
|
||||
} else if (changed_option == &vo_opts->window_minimized) {
|
||||
update_minimized_state(w32);
|
||||
} else if (changed_option == &vo_opts->window_maximized) {
|
||||
|
|
Loading…
Reference in New Issue