* commit 'c2cb01d418dd18e1cf997c038d37378d773121be':
lavf: introduce AVFMT_TS_NEGATIVE
Conflicts:
libavformat/avformat.h
libavformat/mux.c
tests/ref/lavf/asf
tests/ref/lavf/mkv
tests/ref/lavf/mpg
tests/ref/lavf/ts
tests/ref/seek/lavf-asf
tests/ref/seek/lavf-mkv
tests/ref/seek/lavf-mpg
tests/ref/seek/lavf-ts
This commit does not change the default ts behaviour, such
change will, if its done, be done separately.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Most formats do not support negative timestamps, shift them to avoid
unexpected behaviour and a number of bad crashes.
CC:libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
The code did not account properly for packets that where added to
the end of the packet list. Also flags for such packets where not
set correctly leading to incorrect chunked interleaving.
Reported-by: bcoudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
a small value was rounded to 0 and then treated special as if
chunked_duration was 0. This led to a inconsistency that further led
to wrong interleaving
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Sometimes the muxer modifies the packet, like for instance lavf/mp3enc
changing pkt->destruct in order to keep a copy. These changes must be
kept, even though the muxer behaviour is questionable. Regression since
0072116.
Fixes#2124.
After demuxing, data and side are merged. Before decoding, they are
split. Encoder will perform with data and side split. This means that a
muxer can receive split data (after encoding) but also merged data (if
called directly after demuxing). This commit makes sure data and side
are split for the muxer.
otherwise a unexpected timebase could be choosen
that is one that is thousand times more precisse than requested
which can have sideeffects.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>