mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
libavformat/matroskadec: Add test for seeking with codec delay.
Also cleanup parens for the skip_to_timecode check. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bc9ce5f6be
commit
52ec4cc09b
@ -3153,7 +3153,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
|
||||
// Compare signed timecodes. Timecode may be negative due to codec delay
|
||||
// offset. We don't support timestamps greater than int64_t anyway - see
|
||||
// AVPacket's pts.
|
||||
if ((int64_t)timecode < (int64_t)(matroska->skip_to_timecode))
|
||||
if ((int64_t)timecode < (int64_t)matroska->skip_to_timecode)
|
||||
return res;
|
||||
if (is_keyframe)
|
||||
matroska->skip_to_keyframe = 0;
|
||||
|
@ -247,8 +247,11 @@ FATE_SEEK += $(FATE_SEEK_LAVF-yes:%=fate-seek-lavf-%)
|
||||
|
||||
FATE_SEEK_EXTRA-$(CONFIG_MP3_DEMUXER) += fate-seek-extra-mp3
|
||||
FATE_SEEK_EXTRA-$(call ALLYES, CACHE_PROTOCOL PIPE_PROTOCOL MP3_DEMUXER) += fate-seek-cache-pipe
|
||||
FATE_SEEK_EXTRA-$(CONFIG_MATROSKA_DEMUXER) += fate-seek-mkv-codec-delay
|
||||
fate-seek-extra-mp3: CMD = run libavformat/tests/seek$(EXESUF) $(TARGET_SAMPLES)/gapless/gapless.mp3 -fastseek 1
|
||||
fate-seek-cache-pipe: CMD = cat $(TARGET_SAMPLES)/gapless/gapless.mp3 | run libavformat/tests/seek$(EXESUF) cache:pipe:0 -read_ahead_limit -1
|
||||
fate-seek-mkv-codec-delay: CMD = run libavformat/tests/seek$(EXESUF) $(TARGET_SAMPLES)/mkv/codec_delay_opus.mkv
|
||||
|
||||
FATE_SEEK_EXTRA += $(FATE_SEEK_EXTRA-yes)
|
||||
|
||||
|
||||
|
48
tests/ref/seek/mkv-codec-delay
Normal file
48
tests/ref/seek/mkv-codec-delay
Normal file
@ -0,0 +1,48 @@
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret: 0 st:-1 flags:0 ts:-1.000000
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret: 0 st:-1 flags:1 ts: 1.894167
|
||||
ret: 0 st: 0 flags:1 dts: 1.014000 pts: 1.014000 pos: 9306 size: 291
|
||||
ret: 0 st: 0 flags:0 ts: 0.788000
|
||||
ret: 0 st: 0 flags:1 dts: 0.794000 pts: 0.794000 pos: 7358 size: 154
|
||||
ret: 0 st: 0 flags:1 ts:-0.317000
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret:-1 st:-1 flags:0 ts: 2.576668
|
||||
ret: 0 st:-1 flags:1 ts: 1.470835
|
||||
ret: 0 st: 0 flags:1 dts: 1.014000 pts: 1.014000 pos: 9306 size: 291
|
||||
ret: 0 st: 0 flags:0 ts: 0.365000
|
||||
ret: 0 st: 0 flags:1 dts: 0.374000 pts: 0.374000 pos: 3963 size: 150
|
||||
ret: 0 st: 0 flags:1 ts:-0.741000
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret:-1 st:-1 flags:0 ts: 2.153336
|
||||
ret: 0 st:-1 flags:1 ts: 1.047503
|
||||
ret: 0 st: 0 flags:1 dts: 1.014000 pts: 1.014000 pos: 9306 size: 291
|
||||
ret: 0 st: 0 flags:0 ts:-0.058000
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret: 0 st: 0 flags:1 ts: 2.836000
|
||||
ret: 0 st: 0 flags:1 dts: 1.014000 pts: 1.014000 pos: 9306 size: 291
|
||||
ret:-1 st:-1 flags:0 ts: 1.730004
|
||||
ret: 0 st:-1 flags:1 ts: 0.624171
|
||||
ret: 0 st: 0 flags:1 dts: 0.614000 pts: 0.614000 pos: 5903 size: 159
|
||||
ret: 0 st: 0 flags:0 ts:-0.482000
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret: 0 st: 0 flags:1 ts: 2.413000
|
||||
ret: 0 st: 0 flags:1 dts: 1.014000 pts: 1.014000 pos: 9306 size: 291
|
||||
ret:-1 st:-1 flags:0 ts: 1.306672
|
||||
ret: 0 st:-1 flags:1 ts: 0.200839
|
||||
ret: 0 st: 0 flags:1 dts: 0.194000 pts: 0.194000 pos: 2512 size: 159
|
||||
ret: 0 st: 0 flags:0 ts:-0.905000
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret: 0 st: 0 flags:1 ts: 1.989000
|
||||
ret: 0 st: 0 flags:1 dts: 1.014000 pts: 1.014000 pos: 9306 size: 291
|
||||
ret: 0 st:-1 flags:0 ts: 0.883340
|
||||
ret: 0 st: 0 flags:1 dts: 0.894000 pts: 0.894000 pos: 8154 size: 155
|
||||
ret: 0 st:-1 flags:1 ts:-0.222493
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
||||
ret:-1 st: 0 flags:0 ts: 2.672000
|
||||
ret: 0 st: 0 flags:1 ts: 1.566000
|
||||
ret: 0 st: 0 flags:1 dts: 1.014000 pts: 1.014000 pos: 9306 size: 291
|
||||
ret: 0 st:-1 flags:0 ts: 0.460008
|
||||
ret: 0 st: 0 flags:1 dts: 0.474000 pts: 0.474000 pos: 4768 size: 153
|
||||
ret: 0 st:-1 flags:1 ts:-0.645825
|
||||
ret: 0 st: 0 flags:1 dts:-0.007000 pts:-0.007000 pos: 748 size: 320
|
Loading…
Reference in New Issue
Block a user