• Martin Storsjö's avatar
    movenc: Add an option for delaying writing the moov with empty_moov · 847bf598
    Martin Storsjö authored
    This delays writing the moov until the first fragment is written,
    or can be flushed by the caller explicitly when wanted. If the first
    sample in all streams is available at this point, we can write
    a proper editlist at this point, allowing streams to start at
    something else than dts=0. For AC3 and DNXHD, a packet is
    needed in order to write the moov header properly.
    
    This isn't added to the normal behaviour for empty_moov, since
    the behaviour that ftyp+moov is written during avformat_write_header
    would be changed. Callers that split the output stream into header+segments
    (either by flushing manually, with the custom_frag flag set, or by
    just differentiating between data written during avformat_write_header
    and the rest) will need to be adjusted to take this option into use.
    
    For handling streams that start at something else than dts=0, an
    alternative would be to use different kinds of heuristics for
    guessing the start dts (using AVCodecContext delay or has_b_frames
    together with the frame rate), but this is not reliable and doesn't
    necessarily work well with stream copy, and wouldn't work for getting
    the right initialization data for AC3 or DNXHD either.
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    847bf598
Name
Last commit
Last update
compat Loading commit data...
doc 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...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore 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 Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
avconv.c Loading commit data...
avconv.h Loading commit data...
avconv_dxva2.c Loading commit data...
avconv_filter.c Loading commit data...
avconv_opt.c Loading commit data...
avconv_vda.c Loading commit data...
avconv_vdpau.c Loading commit data...
avplay.c Loading commit data...
avprobe.c Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...