Commits on Sep 29, 2018

  1. 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)
    jeeb committed Sep 29, 2018
  2. 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)
    Martin Herkt authored and jeeb committed Sep 29, 2018
  3. audio/format: minor fix for af_fmt_from_planar

    See af_fmt_to_planar.
    
    (cherry picked from commit 4e91cb7)
    tomty89 authored and jeeb committed Sep 29, 2018
  4. manpage: fix --vf exclamation mark description

    An exclamation mark disables the filter by default instead of
    enabling it.
    
    (cherry picked from commit 759a6a2)
    pavelxdd authored and jeeb committed Sep 29, 2018
  5. 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)
    jaseg authored and jeeb committed Sep 29, 2018
  6. 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)
    tomty89 authored and jeeb committed Sep 29, 2018
  7. cocoa-cb: fix crash when no screen is available

    instead of force unwrapping and chaining the optional vars in our
    containsMouseLocation function, safely unwrap and guard the resulting
    var.
    
    Fixes #6062
    
    (cherry picked from commit 6bf0edc)
    Akemi authored and jeeb committed Sep 29, 2018
  8. cocoa-cb: fix crash on macOS 10.10

    the colorspace of the layer is only available on 10.11 and upwards.
    
    Fixes #6041
    
    (cherry picked from commit 049816c)
    Akemi authored and jeeb committed Sep 29, 2018
  9. 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)
    Enzime authored and jeeb committed Sep 29, 2018
  10. ytdl_hook: always load ytdl:// links with ytdl_hook first

    Suggested in IRC by sfan5.
    
    (cherry picked from commit d813156)
    wiiaboo authored and jeeb committed Sep 29, 2018
  11. manpage: fix reference to --tone-mapping by old option name

    (cherry picked from commit d2d7dba)
    xantoz authored and jeeb committed Sep 29, 2018
  12. af_rubberband: reset delay to 0 on reset

    This fixes A-V drift on seeking
    
    (cherry picked from commit a10754f)
    marcan authored and jeeb committed Sep 29, 2018
  13. 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)
    haasn authored and jeeb committed Sep 29, 2018
  14. Revert "ao_openal: enable building on OSX"

    This reverts commit af6126a. Apple's
    OpenAL support is ridiculously out of date, revert back to just using
    OpenAL Soft on macOS (fixes #4645).
    
    (cherry picked from commit 91786fa)
    Enzime authored and jeeb committed Sep 29, 2018
  15. ao_pulse: fix tlength calculation

    also remove the now unused non-sensical af_fmt_seconds_to_bytes.
    
    (cherry picked from commit 9d6b15a)
    tomty89 authored and jeeb committed Sep 29, 2018
  16. mp_image: strip all HDR peak information from SDR clips

    By overriding it with 1.0 (aka SDR). This prevents blowing up on
    mistagged clips.
    
    Fixes #6111
    
    (cherry picked from commit 48c38f7)
    haasn authored and jeeb committed Sep 29, 2018
  17. 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)
    tsaaristo authored and jeeb committed Sep 29, 2018
  18. 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)
    haasn authored and jeeb committed Sep 29, 2018
  19. ytdl_hook: fix audio not being picked up for some sites

    (cherry picked from commit 9dbab96)
    wiiaboo authored and jeeb committed Sep 29, 2018
  20. man/options: emphasize ytdl_hook's script options

    (cherry picked from commit 9c18407)
    wiiaboo authored and jeeb committed Sep 29, 2018
  21. 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)
    jeeb committed Sep 29, 2018
  22. 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)
    jeeb committed Sep 29, 2018
  23. 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)
    jeeb committed Sep 29, 2018
  24. travis: enable CI for release branches

    (cherry picked from commit 085943d)
    jeeb committed Sep 29, 2018

Commits on Sep 30, 2018

  1. demux/packet: fix demux_packet_shorten

    for the rawaudio demuxer to do the expected gapless playback
    
    (cherry picked from commit 95636c6)
    Tom Yan authored and jeeb committed Sep 30, 2018
  2. 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)
    xantoz authored and jeeb committed Sep 30, 2018
  3. 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)
    xantoz authored and jeeb committed Sep 30, 2018
  4. build: check for Swift version and disable dependencies if needed

    (cherry picked from commit 50787ac)
    Akemi authored and jeeb committed Sep 30, 2018
  5. add swift as main dependency so all dependencies can be disabled easily

    (cherry picked from commit 5c2056a)
    Akemi authored and jeeb committed Sep 30, 2018
  6. 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)
    Akemi authored and jeeb committed Sep 30, 2018
  7. 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)
    Akemi authored and jeeb committed Sep 30, 2018

Commits on Oct 1, 2018

  1. 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)
    wm4 authored and jeeb committed Oct 1, 2018
  2. 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)
    wm4 authored and jeeb committed Oct 1, 2018
  3. 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)
    wm4 authored and jeeb committed Oct 1, 2018
  4. 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)
    haasn authored and jeeb committed Oct 1, 2018