1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
FFmpeg/tests/ref/seek
Dale Curtis 37e8edc9f5 avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled.
When sidx box support is enabled, the code will skip reading all
trun boxes (each containing ctts entries for samples inthat box).

If seeks are attempted before all ctts values are known, the old
code would dump ctts entries into the wrong location. These are
then used to compute pts values which leads to out of order and
incorrectly timestamped packets.

This patch fixes ctts processing by always using the index returned
by av_add_index_entry() as the ctts_data index. When the index gains
new entries old values are reshuffled as appropriate.

This approach makes sense since the mov demuxer is already relying
on the mapping of AVIndex entries to samples for correct demuxing.

As a result of this all ctts entries are now 1-count. A followup
change will be submitted to remove support for > 1 count entries
which will simplify seeking.

Notes for future improvement:
Probably there are other boxes (stts, stsc, etc) that are impacted
by this issue... this patch only attempts to fix ctts since it
completely breaks packet timestamping.

This patch continues using an array for the ctts data, which is not
the most ideal given the rearrangement that needs to happen (via
memmove as new entries are read in). Ideally AVIndex and the ctts
data would be set-type structures so addition is always worst case
O(lg(n)) instead of the O(n^2) that exists now; this slowdown is
noticeable during seeks.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-08-24 11:02:22 +02:00
..
acodec-adpcm-ima_qt
acodec-adpcm-ima_qt-trellis
acodec-adpcm-ima_wav
acodec-adpcm-ima_wav-trellis
acodec-adpcm-ms
acodec-adpcm-ms-trellis
acodec-adpcm-swf lavf/flvdec: init AVPacket::pos to FLVTAG offset 2016-10-26 02:12:18 +02:00
acodec-adpcm-swf-trellis lavf/flvdec: init AVPacket::pos to FLVTAG offset 2016-10-26 02:12:18 +02:00
acodec-adpcm-yamaha
acodec-adpcm-yamaha-trellis
acodec-alac
acodec-flac
acodec-mp2
acodec-pcm-alaw
acodec-pcm-f32be
acodec-pcm-f32le
acodec-pcm-f64be
acodec-pcm-f64le
acodec-pcm-mulaw
acodec-pcm-s8
acodec-pcm-s16be
acodec-pcm-s16le
acodec-pcm-s24be
acodec-pcm-s24le
acodec-pcm-s32be
acodec-pcm-s32le
acodec-pcm-u8
cache-pipe ffmpeg, ffprobe: don't "merge" side data into packet data by default 2017-03-14 23:37:28 +01:00
extra-mp3 ffmpeg, ffprobe: don't "merge" side data into packet data by default 2017-03-14 23:37:28 +01:00
extra-mp4 avformat/mov: Fix trampling of ctts during seeks when sidx support is enabled. 2017-08-24 11:02:22 +02:00
lavf-aiff
lavf-alaw
lavf-asf
lavf-au avformat/au: Write MetaData in AU Sun audio file header 2016-06-03 12:18:57 +02:00
lavf-avi
lavf-bmp
lavf-dv_fmt
lavf-ffm
lavf-flv_fmt lavf/flvdec: init AVPacket::pos to FLVTAG offset 2016-10-26 02:12:18 +02:00
lavf-gif
lavf-gxf
lavf-jpg mjpegenc: enable optimal huffman coding by default 2017-04-09 00:00:39 +01:00
lavf-mkv avformat/matroskaenc: write a DisplayUnit element when aspect ratio is unknown 2016-10-15 20:48:03 -03:00
lavf-mmf
lavf-mov
lavf-mpg
lavf-mulaw
lavf-mxf
lavf-mxf_d10
lavf-mxf_opatom
lavf-mxf_opatom_audio
lavf-nut
lavf-ogg
lavf-pbmpipe lavf/img2dec: add pnm pipe demuxers 2016-06-22 15:24:19 +02:00
lavf-pcx
lavf-pgm
lavf-pgmpipe lavf/img2dec: add pnm pipe demuxers 2016-06-22 15:24:19 +02:00
lavf-ppm
lavf-ppmpipe lavf/img2dec: add pnm pipe demuxers 2016-06-22 15:24:19 +02:00
lavf-rm
lavf-sgi
lavf-swf
lavf-tga
lavf-tiff
lavf-ts ffmpeg, ffprobe: don't "merge" side data into packet data by default 2017-03-14 23:37:28 +01:00
lavf-voc
lavf-wav
lavf-wtv
lavf-yuv4mpeg
mkv-codec-delay ffmpeg, ffprobe: don't "merge" side data into packet data by default 2017-03-14 23:37:28 +01:00
vsynth_lena-asv1
vsynth_lena-asv2
vsynth_lena-dnxhd-4k-hr-lb tests/fate: add dnxhr encoding tests 2016-07-24 12:31:07 +02:00
vsynth_lena-dnxhd-720p
vsynth_lena-dnxhd-720p-rd
vsynth_lena-dnxhd-1080i
vsynth_lena-dv
vsynth_lena-dv-50
vsynth_lena-dv-411
vsynth_lena-ffv1
vsynth_lena-flashsv lavf/flvdec: init AVPacket::pos to FLVTAG offset 2016-10-26 02:12:18 +02:00
vsynth_lena-flv lavf/flvdec: init AVPacket::pos to FLVTAG offset 2016-10-26 02:12:18 +02:00
vsynth_lena-h261
vsynth_lena-h263
vsynth_lena-h263p
vsynth_lena-huffyuv
vsynth_lena-jpegls
vsynth_lena-ljpeg
vsynth_lena-mjpeg mjpegenc: enable optimal huffman coding by default 2017-04-09 00:00:39 +01:00
vsynth_lena-mpeg1
vsynth_lena-mpeg1b
vsynth_lena-mpeg2-422
vsynth_lena-mpeg2-idct-int
vsynth_lena-mpeg2-ilace
vsynth_lena-mpeg2-ivlc-qprd
vsynth_lena-mpeg2-thread
vsynth_lena-mpeg2-thread-ivlc
vsynth_lena-mpeg4
vsynth_lena-mpeg4-adap
vsynth_lena-mpeg4-adv
vsynth_lena-mpeg4-error
vsynth_lena-mpeg4-nr
vsynth_lena-mpeg4-nsse
vsynth_lena-mpeg4-qpel
vsynth_lena-mpeg4-qprd
vsynth_lena-mpeg4-rc
vsynth_lena-mpeg4-thread
vsynth_lena-msmpeg4
vsynth_lena-msmpeg4v2
vsynth_lena-rgb
vsynth_lena-roqvideo
vsynth_lena-rv10
vsynth_lena-rv20
vsynth_lena-snow
vsynth_lena-snow-ll
vsynth_lena-svq1
vsynth_lena-wmv1
vsynth_lena-wmv2
vsynth_lena-yuv