ci: do bootstrap outside the docker container
This way the docker container in itself does no networking. It seems like travis disabled network access from the actual docker containers. (cherry picked from commit 2d785f3)
ci: explicitly call waf with python3
Python 2 may not be present in the CI images in the future, but waf’s shebang line still uses its executable name. Explicitly call the right major version of the interpreter. (cherry picked from commit 6eb59fe)
audio/format: minor fix for af_fmt_from_planar
See af_fmt_to_planar. (cherry picked from commit 4e91cb7)
manpage: fix --vf exclamation mark description
An exclamation mark disables the filter by default instead of enabling it. (cherry picked from commit 759a6a2)
manpage: Correct show-text duration default value
duration is parsed as an integer, and the default value is used if ```-1``` is passed. Passing ```-``` as described here causes a parameter value error. (cherry picked from commit cfecbac)
audio/format: decouple af_fmt_is_planar from af_fmt_to_planar
so that af_fmt_to_planar (and hence af_fmt_from_planar) can just return the input when it is not an interleaved (planar) format. (cherry picked from commit f2311ff)
osx: Fix initialization and access of service menu
Replace dot syntax with accessor syntax so that clang no longer errors out due to not finding the property servicesMenu on NSApp. (cherry picked from commit 4e9e46b)
ytdl_hook: always load ytdl:// links with ytdl_hook first
Suggested in IRC by sfan5. (cherry picked from commit d813156)
manpage: fix reference to --tone-mapping by old option name
(cherry picked from commit d2d7dba)
af_rubberband: reset delay to 0 on reset
This fixes A-V drift on seeking (cherry picked from commit a10754f)
vo_gpu: avoid overwriting compute shader block sizes
When using multiple compute shaders as part of the same pass, there can be a conflict in the block sizes. In the problematic case, the HDR detection shader can collide with the polar sampling shader. In this case, the solution is clear - the passes that can handle any size should "give in" and not overwrite the block sizes. Fixes #6083. (cherry picked from commit 1890ca0)
ao_pulse: fix tlength calculation
also remove the now unused non-sensical af_fmt_seconds_to_bytes. (cherry picked from commit 9d6b15a)
encode: fix expected streams when using --lavfi-complex
mpctx->current_track[0][STREAM_VIDEO] (and STREAM_AUDIO) are empty when using --lavfi-complex. Moving the muxer stream hinting after audio/video chain initialization and checking if the chains exist fixes encoding with --lavfi-complex. Previously, the output audio/video streams did not get prepared and the encode would fail due to unexpected stream addition. (cherry picked from commit 3744d0b)
ao_jack: only auto-connect to audio ports
This prevents ao_jack from auto-connecting to MIDI ports (or other, hypothetical future port types). (cherry picked from commit fed0ea1)
ytdl_hook: fix audio not being picked up for some sites
(cherry picked from commit 9dbab96)
man/options: emphasize ytdl_hook's script options
(cherry picked from commit 9c18407)
ao_alsa: early exit get_space if paused or ALSA is not ready
This has been way too long coming, and for me to notice that a whole lot of ao_alsa functions do an early return if the AO is paused. For the STATE_SETUP case, I had this reproduced once, and never since. Still, seems like we can start calling this function before the ALSA device has been fully initialized so we might as well early exit in that case. (cherry picked from commit 3218a58)
ao_alsa: handle XRUNs separately from other errors
According to ALSA doxy, EPIPE is a synonym to SND_PCM_STATE_XRUN, and that is a state that we should attempt to automatically recover from. In case recovery fails, log an error and return zero. A warning message will still be output for each XRUN since those are not something we should generally be receiving. (cherry picked from commit fdc9524)
ao_alsa: log the ALSA state if we get a non-XRUN error
The ALSA state generally can tell us more information in case we get an unexpected error. (cherry picked from commit cea4ff3)
travis: enable CI for release branches
(cherry picked from commit 085943d)
demux/packet: fix demux_packet_shorten
for the rawaudio demuxer to do the expected gapless playback (cherry picked from commit 95636c6)
manpage: minor fix to --drm-format
Looking at other examples, a bar should be used when listing OPT_CHOICE options. (cherry picked from commit f277f9f)
drm_atomic: Allow to create atomic context w/o drmprime video plane
This is to improve the experience when running with default settings on a driver that doesn't have any overlay planes (or indeed only one plane), but still supports DRM atomic. Since the drmprime video plane is set to pick an overlay plane by default it would fail on these drivers due to not being able to create any atomic context. Users with such cards had to specify --drm-video-plane-id manually to some bogus value (it's not used after all). The "video" plane is only ever used by the drmprime-drm hwdec interop, which is not used at all in the typical usecase where everything is actually rendered on to the "OSD" plane using EGL, so having an atomic context without the "video" plane should be fine most of the time. (cherry picked from commit 810acf3)
build: check for Swift version and disable dependencies if needed
(cherry picked from commit 50787ac)
add swift as main dependency so all dependencies can be disabled easily
(cherry picked from commit 5c2056a)
cocoa-cb: move macOS option retrieval to the earliest point possible
moved the retrieval of the macOS specific options from the backend initialisation to the initialisation of the CocoaCB class, the earliest point possible. this way macOS specific options can be used for the opengl context creation for example. (cherry picked from commit 44e49ae)
cocoa-cb: add Apple Software Renderer support
by default the pixel format creation falls back to software renderer when everything fails. this is mostly needed for VMs. additionally one can directly request an sw renderer or exclude it entirely. (cherry picked from commit 8d2d0f0)
demux_lavf: v4l streams are not seekable
FFmpeg is retarded enough not to give us any indication whether it is (unless we query fields not in the ABI/API). I bet FFmpeg developers love it when library users have to litter their code with duplicated information. (cherry picked from commit 20d381d)
stream_libarchive: fix hangs when demuxer does out of bound seeks
This happened with a .flac file inside an archive. It tried to seek beyond the end of the archive entry in a format where seeking isn't supported. stream_libarchive handles these situations by skipping data. But when the end of the archive is reached, archive_read_data() returns 0. While libarchive didn't bother to fucking document this, they do say it's supposed to work like read(), so I guess a return value of 0 really means EOF. So change the "< 0" to "<= 0". Also add some error logging. The same file actually worked without out of bounds reads when extracted, so there still might be something very wrong. (cherry picked from commit 7e85dc2)
demux_lavf: hack-fix EDL mp4 DASH hack
I encountered a stream that fails with "Could not demux init fragment.". It turns out this is a regression from the recent change to that code. The assumption was that demux_lavf.c would treat this as concatenated stream - which it does, but not for probing. Doing this transparently is hard without doing it properly. Doing it properly would mean creating some sort of stream_concat (reminiscent of that FFmpeg security bug). I probably don't want to go there, and I think libavformat should just support this directly, so whatever. Hack-fix this with the knowledge that the init segment will always contain the headers. (cherry picked from commit 315004a)
encode: fix AVPacket deinitialization logic
Since this function is called with packets on the stack, trying to free them makes no sense. Instead, it should unref (which is what `av_interleaved_write_frame` does anyway, rather than freeing). Also, the calling code tried unreffing the packet a second time, even after it was "freed" by the callee in the failure case - and after ownership was taken over by `av_interleaved_write_frame` in the successful case. Both of these cases were wrong. (cherry picked from commit 6d61c5f)