• Philip Langdale's avatar
    avformat/hls: Set AVFMT_TS_DISCONT flag on HLS input format · d6ac6650
    Philip Langdale authored
    There have been many reports over the years about problems when
    taking an HLS stream as input to `ffmpeg` where there are timestamp
    discontinuities present. This is explicitly supported in the
    HLS spec (EXT-X-DISCONTINUITY) and often used for ad injection.
    
    Various fixes and work-arounds have been proposed over the years,
    but one step that seems obvious, even if it's not a complete fix,
    is to mark the HLS input format as supporting discontinuities. This
    will prevent timestamp fixup logic in ffmpeg.c kicking in that ends
    up mangling the timestamps unnecessarily.
    
    I've tested this out with an example provided by Joe Koberg early
    last year, and it is sufficient to allow `ffmpeg` to download and
    mux the stream correctly. Joe had briefly suggested that other
    situations can still be handled incorrectly, but this seems like
    a strict improvement.
    
    Joe's example:
    
    https://s3.amazonaws.com/playon-test-videos/discont_test_new/discont_test.m3u8Reviewed-by: 's avatarSteven Liu <lq@onvideo.cn>
    Reviewed-by: 's avatarDennis Mungai <dmngaie@gmail.com>
    d6ac6650
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...