* commit '2df0c32ea12ddfa72ba88309812bfb13b674130f':
lavc: use a separate field for exporting audio encoder padding
Conflicts:
libavcodec/audio_frame_queue.c
libavcodec/avcodec.h
libavcodec/libvorbisenc.c
libavcodec/utils.c
libavcodec/version.h
libavcodec/wmaenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '1f29e5d7a2b0950f3b6820896e97e2c02e6a10a9':
h263dec: call get_format after setting resolution and profile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Currently, the amount of padding inserted at the beginning by some audio
encoders, is exported through AVCodecContext.delay. However
- the term 'delay' is heavily overloaded and can have multiple different
meanings even in the case of audio encoding.
- this field has entirely different meanings, depending on whether the
codec context is used for encoding or decoding (and has yet another
different meaning for video), preventing generic handling of the codec
context.
Therefore, add a new field -- AVCodecContext.initial_padding. It could
conceivably be used for decoding as well at a later point.
E-AC-3 samples should contain 6 audio blocks, so concatenate syncframes
in order to achieve this.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This introduces a new option to the mov demuxer: -use_mfra_for
(pts|dts). When it's given and moofs and a MFRA are present, the MFRA's
TFRAs are read for fragment start times.
Unfortunately some programs that produce fragmented mp4s use the TFRA
time field for dts and some for pts. There is no realistic way to detect
which is the case, hence the responsibility is punted onto the user.
This also means that no behavioural change is enabled by default - you
must pass either dts or pts for anything to happen.
Without this change, timestamps for some discontinuous fragmented mp4 are
wrong, and cause audio/video desync and are not usable for generating
HLS.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'e44ee1eb8db7393e9d43207c2e1812720e292e6d':
movenc: Simplify code by using an existing local pointer
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'dad12ce452a9d69c0d9d53c375003947d5f1b02e':
movenc: Print a warning for an unhandled case of nonzero start dts with empty_moov
Conflicts:
libavformat/movenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'dbb472cb2f2f799295a12b4922a6a8be2cccfdee':
movenc: Write edit lists for fragmented files as well, if necessary
Conflicts:
libavformat/movenc.c
The default for writing EDTS for fragmented mp4 is left at disabled
this can be overridden via command line with -use_editlist
but EDTS + fragments still does not fully work, which is why it is
left disabled by default
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Regression test for the bug from trac ticket #3849 fixed in commit 14e30255
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
* commit '95ee4e2ce774e0339632d067161596bf3dadfc72':
movenc: Add some comments explaining subtle details in writing the edit lists
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '72f801619a1ae91969fee9a7d72519422433c998':
movenc: Adjust edit lists to trim out parts of tracks with negative pts
Conflicts:
libavformat/movenc.c
See: 66b45d8f7a
See: 14fd34d73b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '8bef43388132b53f59a6e90add18900a3bb4cc60':
smoothstreamingenc: Simplify code by removing a redundant variable
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Icecast uses HTTP 1.0 while Libav uses HTTP 1.1 and enables by
default chunked post.
Icecast actually forwards the HTTP chunk headers to the listener
as part of the media stream (without the chunk encoding HTTP headers)
causing the players to lose sync.
Disabling the option is enough to feed icecast properly.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This is necessary to get the right timestamp offset for content
that starts with dts != 0.
This currently only helps when writing fragmented files with a non-empty
moov atom. When writing an empty moov atom, we don't have any packets
yet, so we don't know the starting dts for the tracks.
Signed-off-by: Martin Storsjö <martin@martin.st>
This makes sure that audio preroll for e.g. AAC is signaled correctly.
Previously we only wrote the edit list correctly if we had negative
dts but started with pts == 0 (e.g. for video with B-frames).
Signed-off-by: Martin Storsjö <martin@martin.st>
move the code after the existing NULL check
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'bd239c9a2e151c0aeeb653a571f130aae7320894':
lavf: Don't drop both pts and dts if timestamps are invalid
Conflicts:
libavformat/utils.c
tests/ref/fate/vc1-ism
See: cd6851c5ef
Merged-by: Michael Niedermayer <michaelni@gmx.at>
In these cases, only drop dts. Because if we drop both we have no
timestamps at all for some files.
This improves playback of HLS streams from GoPro cameras.
Signed-off-by: Martin Storsjö <martin@martin.st>