summaryrefslogtreecommitdiff
path: root/tests/ref/seek
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ref/seek')
-rw-r--r--tests/ref/seek/acodec-adpcm-ima_qt-trellis53
-rw-r--r--tests/ref/seek/acodec-adpcm-ima_wav-trellis53
-rw-r--r--tests/ref/seek/acodec-adpcm-ms-trellis53
-rw-r--r--tests/ref/seek/acodec-adpcm-swf46
-rw-r--r--tests/ref/seek/acodec-adpcm-swf-trellis49
-rw-r--r--tests/ref/seek/acodec-adpcm-yamaha-trellis53
-rw-r--r--tests/ref/seek/acodec-flac58
-rw-r--r--tests/ref/seek/acodec-pcm-f32be54
-rw-r--r--tests/ref/seek/acodec-pcm-f64be54
-rw-r--r--tests/ref/seek/acodec-pcm-s16le54
-rw-r--r--tests/ref/seek/acodec-pcm-u854
-rw-r--r--tests/ref/seek/cache-pipe49
-rw-r--r--tests/ref/seek/extra-mp353
-rw-r--r--tests/ref/seek/extra-mp4134
-rw-r--r--tests/ref/seek/lavf-aiff30
-rw-r--r--tests/ref/seek/lavf-asf54
-rw-r--r--tests/ref/seek/lavf-au30
-rw-r--r--tests/ref/seek/lavf-avi36
-rw-r--r--tests/ref/seek/lavf-bmp9
-rw-r--r--tests/ref/seek/lavf-dv_fmt54
-rw-r--r--tests/ref/seek/lavf-ffm53
-rw-r--r--tests/ref/seek/lavf-flv_fmt36
-rw-r--r--tests/ref/seek/lavf-gif67
-rw-r--r--tests/ref/seek/lavf-gxf36
-rw-r--r--tests/ref/seek/lavf-jpg11
-rw-r--r--tests/ref/seek/lavf-mkv59
-rw-r--r--tests/ref/seek/lavf-mmf53
-rw-r--r--tests/ref/seek/lavf-mov60
-rw-r--r--tests/ref/seek/lavf-mpg54
-rw-r--r--tests/ref/seek/lavf-mxf44
-rw-r--r--tests/ref/seek/lavf-mxf_dv2553
-rw-r--r--tests/ref/seek/lavf-mxf_dvcpro5053
-rw-r--r--tests/ref/seek/lavf-mxf_opatom (renamed from tests/ref/seek/vsynth2-dv-411)54
-rw-r--r--tests/ref/seek/lavf-mxf_opatom_audio53
-rw-r--r--tests/ref/seek/lavf-nut86
-rw-r--r--tests/ref/seek/lavf-ogg63
-rw-r--r--tests/ref/seek/lavf-pbmpipe22
-rw-r--r--tests/ref/seek/lavf-pcx9
-rw-r--r--tests/ref/seek/lavf-pgm9
-rw-r--r--tests/ref/seek/lavf-pgmpipe22
-rw-r--r--tests/ref/seek/lavf-ppm9
-rw-r--r--tests/ref/seek/lavf-ppmpipe22
-rw-r--r--tests/ref/seek/lavf-rm54
-rw-r--r--tests/ref/seek/lavf-sgi9
-rw-r--r--tests/ref/seek/lavf-tga9
-rw-r--r--tests/ref/seek/lavf-tiff9
-rw-r--r--tests/ref/seek/lavf-ts54
-rw-r--r--tests/ref/seek/lavf-voc57
-rw-r--r--tests/ref/seek/lavf-wav30
-rw-r--r--tests/ref/seek/lavf-wtv48
-rw-r--r--tests/ref/seek/lavf-yuv4mpeg54
-rw-r--r--tests/ref/seek/mkv-codec-delay48
-rw-r--r--tests/ref/seek/vsynth2-jpegls46
-rw-r--r--tests/ref/seek/vsynth2-ljpeg46
-rw-r--r--tests/ref/seek/vsynth2-mjpeg46
-rw-r--r--tests/ref/seek/vsynth2-mpeg146
-rw-r--r--tests/ref/seek/vsynth2-mpeg1b46
-rw-r--r--tests/ref/seek/vsynth2-mpeg2-42246
-rw-r--r--tests/ref/seek/vsynth2-mpeg2-idct-int46
-rw-r--r--tests/ref/seek/vsynth2-mpeg2-ivlc-qprd46
-rw-r--r--tests/ref/seek/vsynth2-mpeg450
-rw-r--r--tests/ref/seek/vsynth2-mpeg4-adap46
-rw-r--r--tests/ref/seek/vsynth2-mpeg4-error46
-rw-r--r--tests/ref/seek/vsynth2-mpeg4-rc46
-rw-r--r--tests/ref/seek/vsynth2-mpeg4-thread46
-rw-r--r--tests/ref/seek/vsynth2-svq150
-rw-r--r--tests/ref/seek/vsynth2-wmv146
-rw-r--r--tests/ref/seek/vsynth_lena-asv1 (renamed from tests/ref/seek/vsynth2-asv1)40
-rw-r--r--tests/ref/seek/vsynth_lena-asv2 (renamed from tests/ref/seek/vsynth2-asv2)40
-rw-r--r--tests/ref/seek/vsynth_lena-dnxhd-1080i (renamed from tests/ref/seek/vsynth2-dnxhd-1080i)24
-rw-r--r--tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb40
-rw-r--r--tests/ref/seek/vsynth_lena-dnxhd-720p (renamed from tests/ref/seek/vsynth2-dnxhd-720p-rd)24
-rw-r--r--tests/ref/seek/vsynth_lena-dnxhd-720p-rd (renamed from tests/ref/seek/vsynth2-dnxhd-720p)24
-rw-r--r--tests/ref/seek/vsynth_lena-dv (renamed from tests/ref/seek/vsynth2-dv-50)54
-rw-r--r--tests/ref/seek/vsynth_lena-dv-411 (renamed from tests/ref/seek/vsynth2-dv)54
-rw-r--r--tests/ref/seek/vsynth_lena-dv-5053
-rw-r--r--tests/ref/seek/vsynth_lena-ffv1 (renamed from tests/ref/seek/vsynth2-ffv1)40
-rw-r--r--tests/ref/seek/vsynth_lena-flashsv (renamed from tests/ref/seek/vsynth2-flashsv)40
-rw-r--r--tests/ref/seek/vsynth_lena-flv (renamed from tests/ref/seek/vsynth2-flv)40
-rw-r--r--tests/ref/seek/vsynth_lena-h261 (renamed from tests/ref/seek/vsynth2-h263)40
-rw-r--r--tests/ref/seek/vsynth_lena-h263 (renamed from tests/ref/seek/vsynth2-msmpeg4v2)40
-rw-r--r--tests/ref/seek/vsynth_lena-h263p (renamed from tests/ref/seek/vsynth2-h263p)40
-rw-r--r--tests/ref/seek/vsynth_lena-huffyuv (renamed from tests/ref/seek/vsynth2-huffyuv)40
-rw-r--r--tests/ref/seek/vsynth_lena-jpegls46
-rw-r--r--tests/ref/seek/vsynth_lena-ljpeg46
-rw-r--r--tests/ref/seek/vsynth_lena-mjpeg46
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg146
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg1b46
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg2-42246
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg2-idct-int46
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg2-ilace46
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg2-ivlc-qprd46
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg2-thread46
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg2-thread-ivlc46
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg450
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-adap (renamed from tests/ref/seek/vsynth2-mpeg2-thread-ivlc)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-adv (renamed from tests/ref/seek/vsynth2-msmpeg4)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-error (renamed from tests/ref/seek/vsynth2-mpeg4-adv)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-nr (renamed from tests/ref/seek/vsynth2-wmv2)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-nsse (renamed from tests/ref/seek/vsynth2-mpeg4-nr)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-qpel (renamed from tests/ref/seek/vsynth2-mpeg4-qpel)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-qprd (renamed from tests/ref/seek/vsynth2-mpeg2-ilace)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-rc (renamed from tests/ref/seek/vsynth2-mpeg2-thread)40
-rw-r--r--tests/ref/seek/vsynth_lena-mpeg4-thread (renamed from tests/ref/seek/vsynth2-mpeg4-qprd)40
-rw-r--r--tests/ref/seek/vsynth_lena-msmpeg4 (renamed from tests/ref/seek/vsynth2-h261)40
-rw-r--r--tests/ref/seek/vsynth_lena-msmpeg4v246
-rw-r--r--tests/ref/seek/vsynth_lena-rgb (renamed from tests/ref/seek/vsynth2-rgb)40
-rw-r--r--tests/ref/seek/vsynth_lena-roqvideo (renamed from tests/ref/seek/vsynth2-roqvideo)2
-rw-r--r--tests/ref/seek/vsynth_lena-rv10 (renamed from tests/ref/seek/vsynth2-rv10)52
-rw-r--r--tests/ref/seek/vsynth_lena-rv20 (renamed from tests/ref/seek/vsynth2-rv20)54
-rw-r--r--tests/ref/seek/vsynth_lena-snow46
-rw-r--r--tests/ref/seek/vsynth_lena-snow-ll46
-rw-r--r--tests/ref/seek/vsynth_lena-svq150
-rw-r--r--tests/ref/seek/vsynth_lena-wmv146
-rw-r--r--tests/ref/seek/vsynth_lena-wmv246
-rw-r--r--tests/ref/seek/vsynth_lena-yuv (renamed from tests/ref/seek/vsynth2-yuv)40
116 files changed, 3115 insertions, 1970 deletions
diff --git a/tests/ref/seek/acodec-adpcm-ima_qt-trellis b/tests/ref/seek/acodec-adpcm-ima_qt-trellis
new file mode 100644
index 0000000000..bdaf1f0f0c
--- /dev/null
+++ b/tests/ref/seek/acodec-adpcm-ima_qt-trellis
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.893878 pts: 1.893878 pos: 88812 size: 68
+ret: 0 st: 0 flags:0 ts: 0.788345
+ret: 0 st: 0 flags:1 dts: 0.789478 pts: 0.789478 pos: 37064 size: 68
+ret: 0 st: 0 flags:1 ts:-0.317506
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 2.577438 pts: 2.577438 pos: 120840 size: 68
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.470113 pts: 1.470113 pos: 68956 size: 68
+ret: 0 st: 0 flags:0 ts: 0.365011
+ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 17208 size: 68
+ret: 0 st: 0 flags:1 ts:-0.740839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 2.153673 pts: 2.153673 pos: 100984 size: 68
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.046349 pts: 1.046349 pos: 49100 size: 68
+ret: 0 st: 0 flags:0 ts:-0.058322
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st: 0 flags:1 ts: 2.835828
+ret: 0 st: 0 flags:1 dts: 2.835760 pts: 2.835760 pos: 132944 size: 68
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.731338 pts: 1.731338 pos: 81196 size: 68
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.624036 pts: 0.624036 pos: 29312 size: 68
+ret: 0 st: 0 flags:0 ts:-0.481655
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st: 0 flags:1 ts: 2.412494
+ret: 0 st: 0 flags:1 dts: 2.411995 pts: 2.411995 pos: 113088 size: 68
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.307574 pts: 1.307574 pos: 61340 size: 68
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200272 pts: 0.200272 pos: 9456 size: 68
+ret: 0 st: 0 flags:0 ts:-0.904989
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st: 0 flags:1 ts: 1.989184
+ret: 0 st: 0 flags:1 dts: 1.988209 pts: 1.988209 pos: 93232 size: 68
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.883810 pts: 0.883810 pos: 41484 size: 68
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
+ret: 0 st: 0 flags:0 ts: 2.671678
+ret: 0 st: 0 flags:1 dts: 2.671769 pts: 2.671769 pos: 125260 size: 68
+ret: 0 st: 0 flags:1 ts: 1.565850
+ret: 0 st: 0 flags:1 dts: 1.564444 pts: 1.564444 pos: 73376 size: 68
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.460045 pts: 0.460045 pos: 21628 size: 68
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 72 size: 68
diff --git a/tests/ref/seek/acodec-adpcm-ima_wav-trellis b/tests/ref/seek/acodec-adpcm-ima_wav-trellis
new file mode 100644
index 0000000000..b6517c5438
--- /dev/null
+++ b/tests/ref/seek/acodec-adpcm-ima_wav-trellis
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.856009 pts: 1.856009 pos: 29756 size: 4096
+ret: 0 st: 0 flags:0 ts: 0.788345
+ret: 0 st: 0 flags:1 dts: 0.831995 pts: 0.831995 pos: 13372 size: 4096
+ret: 0 st: 0 flags:1 ts:-0.317506
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 2.623991 pts: 2.623991 pos: 42044 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.408005 pts: 1.408005 pos: 22588 size: 4096
+ret: 0 st: 0 flags:0 ts: 0.365011
+ret: 0 st: 0 flags:1 dts: 0.383991 pts: 0.383991 pos: 6204 size: 4096
+ret: 0 st: 0 flags:1 ts:-0.740839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 2.176009 pts: 2.176009 pos: 34876 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.023991 pts: 1.023991 pos: 16444 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.058322
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.835828
+ret: 0 st: 0 flags:1 dts: 2.816009 pts: 2.816009 pos: 45116 size: 4096
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.791995 pts: 1.791995 pos: 28732 size: 4096
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.576009 pts: 0.576009 pos: 9276 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.481655
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.412494
+ret: 0 st: 0 flags:1 dts: 2.368005 pts: 2.368005 pos: 37948 size: 4096
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.343991 pts: 1.343991 pos: 21564 size: 4096
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.191995 pts: 0.191995 pos: 3132 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.904989
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st: 0 flags:1 ts: 1.989184
+ret: 0 st: 0 flags:1 dts: 1.983991 pts: 1.983991 pos: 31804 size: 4096
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.896009 pts: 0.896009 pos: 14396 size: 4096
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
+ret: 0 st: 0 flags:0 ts: 2.671678
+ret: 0 st: 0 flags:1 dts: 2.688005 pts: 2.688005 pos: 43068 size: 4096
+ret: 0 st: 0 flags:1 ts: 1.565850
+ret: 0 st: 0 flags:1 dts: 1.536009 pts: 1.536009 pos: 24636 size: 4096
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.511995 pts: 0.511995 pos: 8252 size: 4096
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 60 size: 4096
diff --git a/tests/ref/seek/acodec-adpcm-ms-trellis b/tests/ref/seek/acodec-adpcm-ms-trellis
new file mode 100644
index 0000000000..579be7f416
--- /dev/null
+++ b/tests/ref/seek/acodec-adpcm-ms-trellis
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.856009 pts: 1.856009 pos: 29786 size: 4096
+ret: 0 st: 0 flags:0 ts: 0.788345
+ret: 0 st: 0 flags:1 dts: 0.831995 pts: 0.831995 pos: 13402 size: 4096
+ret: 0 st: 0 flags:1 ts:-0.317506
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 2.623991 pts: 2.623991 pos: 42074 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.408005 pts: 1.408005 pos: 22618 size: 4096
+ret: 0 st: 0 flags:0 ts: 0.365011
+ret: 0 st: 0 flags:1 dts: 0.383991 pts: 0.383991 pos: 6234 size: 4096
+ret: 0 st: 0 flags:1 ts:-0.740839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 2.176009 pts: 2.176009 pos: 34906 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.023991 pts: 1.023991 pos: 16474 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.058322
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.835828
+ret: 0 st: 0 flags:1 dts: 2.816009 pts: 2.816009 pos: 45146 size: 4096
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.791995 pts: 1.791995 pos: 28762 size: 4096
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.576009 pts: 0.576009 pos: 9306 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.481655
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.412494
+ret: 0 st: 0 flags:1 dts: 2.368005 pts: 2.368005 pos: 37978 size: 4096
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.343991 pts: 1.343991 pos: 21594 size: 4096
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.191995 pts: 0.191995 pos: 3162 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.904989
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st: 0 flags:1 ts: 1.989184
+ret: 0 st: 0 flags:1 dts: 1.983991 pts: 1.983991 pos: 31834 size: 4096
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.896009 pts: 0.896009 pos: 14426 size: 4096
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
+ret: 0 st: 0 flags:0 ts: 2.671678
+ret: 0 st: 0 flags:1 dts: 2.688005 pts: 2.688005 pos: 43098 size: 4096
+ret: 0 st: 0 flags:1 ts: 1.565850
+ret: 0 st: 0 flags:1 dts: 1.536009 pts: 1.536009 pos: 24666 size: 4096
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.511995 pts: 0.511995 pos: 8282 size: 4096
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 90 size: 4096
diff --git a/tests/ref/seek/acodec-adpcm-swf b/tests/ref/seek/acodec-adpcm-swf
index 2f9091325a..5905b33b6e 100644
--- a/tests/ref/seek/acodec-adpcm-swf
+++ b/tests/ref/seek/acodec-adpcm-swf
@@ -1,49 +1,49 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 208 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 208 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.858000 pts: 1.858000 pos: 82968 size: 2053
+ret: 0 st: 0 flags:1 dts: 1.858000 pts: 1.858000 pos: 82956 size: 2053
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.789000 pts: 0.789000 pos: 35381 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.789000 pts: 0.789000 pos: 35369 size: 2053
ret:-1 st: 0 flags:1 ts:-0.317000
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.601000 pts: 2.601000 pos: 116072 size: 2053
+ret: 0 st: 0 flags:1 dts: 2.601000 pts: 2.601000 pos: 116060 size: 2053
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 64347 size: 2053
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 64335 size: 2053
ret: 0 st: 0 flags:0 ts: 0.365000
-ret: 0 st: 0 flags:1 dts: 0.372000 pts: 0.372000 pos: 16760 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.372000 pts: 0.372000 pos: 16748 size: 2053
ret:-1 st: 0 flags:1 ts:-0.741000
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.183000 pts: 2.183000 pos: 97451 size: 2053
+ret: 0 st: 0 flags:1 dts: 2.183000 pts: 2.183000 pos: 97439 size: 2053
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.022000 pts: 1.022000 pos: 45726 size: 2053
+ret: 0 st: 0 flags:1 dts: 1.022000 pts: 1.022000 pos: 45714 size: 2053
ret: 0 st: 0 flags:0 ts:-0.058000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 208 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
ret: 0 st: 0 flags:1 ts: 2.836000
-ret: 0 st: 0 flags:1 dts: 2.833000 pts: 2.833000 pos: 126417 size: 2053
+ret: 0 st: 0 flags:1 dts: 2.833000 pts: 2.833000 pos: 126405 size: 2053
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.765000 pts: 1.765000 pos: 78830 size: 2053
+ret: 0 st: 0 flags:1 dts: 1.765000 pts: 1.765000 pos: 78818 size: 2053
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.604000 pts: 0.604000 pos: 27105 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.604000 pts: 0.604000 pos: 27093 size: 2053
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 208 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 2.368000 pts: 2.368000 pos: 105727 size: 2053
+ret: 0 st: 0 flags:1 dts: 2.368000 pts: 2.368000 pos: 105715 size: 2053
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.347000 pts: 1.347000 pos: 60209 size: 2053
+ret: 0 st: 0 flags:1 dts: 1.347000 pts: 1.347000 pos: 60197 size: 2053
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.186000 pts: 0.186000 pos: 8484 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.186000 pts: 0.186000 pos: 8472 size: 2053
ret: 0 st: 0 flags:0 ts:-0.905000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 208 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
ret: 0 st: 0 flags:1 ts: 1.989000
-ret: 0 st: 0 flags:1 dts: 1.950000 pts: 1.950000 pos: 87106 size: 2053
+ret: 0 st: 0 flags:1 dts: 1.950000 pts: 1.950000 pos: 87094 size: 2053
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.929000 pts: 0.929000 pos: 41588 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.929000 pts: 0.929000 pos: 41576 size: 2053
ret:-1 st:-1 flags:1 ts:-0.222493
ret: 0 st: 0 flags:0 ts: 2.672000
-ret: 0 st: 0 flags:1 dts: 2.694000 pts: 2.694000 pos: 120210 size: 2053
+ret: 0 st: 0 flags:1 dts: 2.694000 pts: 2.694000 pos: 120198 size: 2053
ret: 0 st: 0 flags:1 ts: 1.566000
-ret: 0 st: 0 flags:1 dts: 1.533000 pts: 1.533000 pos: 68485 size: 2053
+ret: 0 st: 0 flags:1 dts: 1.533000 pts: 1.533000 pos: 68473 size: 2053
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.464000 pts: 0.464000 pos: 20898 size: 2053
+ret: 0 st: 0 flags:1 dts: 0.464000 pts: 0.464000 pos: 20886 size: 2053
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/acodec-adpcm-swf-trellis b/tests/ref/seek/acodec-adpcm-swf-trellis
new file mode 100644
index 0000000000..5905b33b6e
--- /dev/null
+++ b/tests/ref/seek/acodec-adpcm-swf-trellis
@@ -0,0 +1,49 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.858000 pts: 1.858000 pos: 82956 size: 2053
+ret: 0 st: 0 flags:0 ts: 0.788000
+ret: 0 st: 0 flags:1 dts: 0.789000 pts: 0.789000 pos: 35369 size: 2053
+ret:-1 st: 0 flags:1 ts:-0.317000
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 2.601000 pts: 2.601000 pos: 116060 size: 2053
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 64335 size: 2053
+ret: 0 st: 0 flags:0 ts: 0.365000
+ret: 0 st: 0 flags:1 dts: 0.372000 pts: 0.372000 pos: 16748 size: 2053
+ret:-1 st: 0 flags:1 ts:-0.741000
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 2.183000 pts: 2.183000 pos: 97439 size: 2053
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.022000 pts: 1.022000 pos: 45714 size: 2053
+ret: 0 st: 0 flags:0 ts:-0.058000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
+ret: 0 st: 0 flags:1 ts: 2.836000
+ret: 0 st: 0 flags:1 dts: 2.833000 pts: 2.833000 pos: 126405 size: 2053
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.765000 pts: 1.765000 pos: 78818 size: 2053
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.604000 pts: 0.604000 pos: 27093 size: 2053
+ret: 0 st: 0 flags:0 ts:-0.482000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
+ret: 0 st: 0 flags:1 ts: 2.413000
+ret: 0 st: 0 flags:1 dts: 2.368000 pts: 2.368000 pos: 105715 size: 2053
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.347000 pts: 1.347000 pos: 60197 size: 2053
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.186000 pts: 0.186000 pos: 8472 size: 2053
+ret: 0 st: 0 flags:0 ts:-0.905000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 196 size: 2053
+ret: 0 st: 0 flags:1 ts: 1.989000
+ret: 0 st: 0 flags:1 dts: 1.950000 pts: 1.950000 pos: 87094 size: 2053
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.929000 pts: 0.929000 pos: 41576 size: 2053
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:0 ts: 2.672000
+ret: 0 st: 0 flags:1 dts: 2.694000 pts: 2.694000 pos: 120198 size: 2053
+ret: 0 st: 0 flags:1 ts: 1.566000
+ret: 0 st: 0 flags:1 dts: 1.533000 pts: 1.533000 pos: 68473 size: 2053
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.464000 pts: 0.464000 pos: 20886 size: 2053
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/acodec-adpcm-yamaha-trellis b/tests/ref/seek/acodec-adpcm-yamaha-trellis
new file mode 100644
index 0000000000..5cbfaed73e
--- /dev/null
+++ b/tests/ref/seek/acodec-adpcm-yamaha-trellis
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.856009 pts: 1.856009 pos: 29754 size: 4096
+ret: 0 st: 0 flags:0 ts: 0.788345
+ret: 0 st: 0 flags:1 dts: 0.831995 pts: 0.831995 pos: 13370 size: 4096
+ret: 0 st: 0 flags:1 ts:-0.317506
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 2.623991 pts: 2.623991 pos: 42042 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.408005 pts: 1.408005 pos: 22586 size: 4096
+ret: 0 st: 0 flags:0 ts: 0.365011
+ret: 0 st: 0 flags:1 dts: 0.383991 pts: 0.383991 pos: 6202 size: 4096
+ret: 0 st: 0 flags:1 ts:-0.740839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 2.176009 pts: 2.176009 pos: 34874 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.023991 pts: 1.023991 pos: 16442 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.058322
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.835828
+ret: 0 st: 0 flags:1 dts: 2.816009 pts: 2.816009 pos: 45114 size: 4096
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.791995 pts: 1.791995 pos: 28730 size: 4096
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.576009 pts: 0.576009 pos: 9274 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.481655
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.412494
+ret: 0 st: 0 flags:1 dts: 2.368005 pts: 2.368005 pos: 37946 size: 4096
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.343991 pts: 1.343991 pos: 21562 size: 4096
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.191995 pts: 0.191995 pos: 3130 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.904989
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st: 0 flags:1 ts: 1.989184
+ret: 0 st: 0 flags:1 dts: 1.983991 pts: 1.983991 pos: 31802 size: 4096
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.896009 pts: 0.896009 pos: 14394 size: 4096
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
+ret: 0 st: 0 flags:0 ts: 2.671678
+ret: 0 st: 0 flags:1 dts: 2.688005 pts: 2.688005 pos: 43066 size: 4096
+ret: 0 st: 0 flags:1 ts: 1.565850
+ret: 0 st: 0 flags:1 dts: 1.536009 pts: 1.536009 pos: 24634 size: 4096
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.511995 pts: 0.511995 pos: 8250 size: 4096
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 58 size: 4096
diff --git a/tests/ref/seek/acodec-flac b/tests/ref/seek/acodec-flac
index 15ab0d2ee3..f6add9abd2 100644
--- a/tests/ref/seek/acodec-flac
+++ b/tests/ref/seek/acodec-flac
@@ -1,49 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos: 86741 size: 2191
+ret: 0 st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos: 86742 size: 2191
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.809796 pts: 0.809796 pos: 27365 size: 615
-ret:-1 st: 0 flags:1 ts:-0.317506
+ret: 0 st: 0 flags:1 dts: 0.809796 pts: 0.809796 pos: 27366 size: 615
+ret: 0 st: 0 flags:1 ts:-0.317506
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.586122 pts: 2.586122 pos: 145605 size: 2384
+ret: 0 st: 0 flags:1 dts: 2.586122 pts: 2.586122 pos: 145606 size: 2384
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.462857 pts: 1.462857 pos: 53387 size: 1851
+ret: 0 st: 0 flags:1 dts: 1.462857 pts: 1.462857 pos: 53388 size: 1851
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 16889 size: 614
-ret:-1 st: 0 flags:1 ts:-0.740839
+ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 16890 size: 614
+ret: 0 st: 0 flags:1 ts:-0.740839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.168163 pts: 2.168163 pos: 110530 size: 2143
+ret: 0 st: 0 flags:1 dts: 2.168163 pts: 2.168163 pos: 110531 size: 2143
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.044898 pts: 1.044898 pos: 32879 size: 579
+ret: 0 st: 0 flags:1 dts: 1.044898 pts: 1.044898 pos: 32880 size: 579
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st: 0 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 2.821224 pts: 2.821224 pos: 167111 size: 2391
+ret: 0 st: 0 flags:1 dts: 2.821224 pts: 2.821224 pos: 167112 size: 2391
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.750204 pts: 1.750204 pos: 75787 size: 2191
+ret: 0 st: 0 flags:1 dts: 1.750204 pts: 1.750204 pos: 75788 size: 2191
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.600816 pts: 0.600816 pos: 22445 size: 616
+ret: 0 st: 0 flags:1 dts: 0.600816 pts: 0.600816 pos: 22446 size: 616
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st: 0 flags:1 ts: 2.412494
-ret: 0 st: 0 flags:1 dts: 2.403265 pts: 2.403265 pos: 129792 size: 2138
+ret: 0 st: 0 flags:1 dts: 2.403265 pts: 2.403265 pos: 129793 size: 2138
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.332245 pts: 1.332245 pos: 44811 size: 1609
+ret: 0 st: 0 flags:1 dts: 1.332245 pts: 1.332245 pos: 44812 size: 1609
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.182857 pts: 0.182857 pos: 12571 size: 628
+ret: 0 st: 0 flags:1 dts: 0.182857 pts: 0.182857 pos: 12572 size: 628
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8255 size: 614
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st: 0 flags:1 ts: 1.989184
-ret: 0 st: 0 flags:1 dts: 1.985306 pts: 1.985306 pos: 95507 size: 2169
+ret: 0 st: 0 flags:1 dts: 1.985306 pts: 1.985306 pos: 95508 size: 2169
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.888163 pts: 0.888163 pos: 29210 size: 620
-ret:-1 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.888163 pts: 0.888163 pos: 29211 size: 620
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
ret: 0 st: 0 flags:0 ts: 2.671678
-ret: 0 st: 0 flags:1 dts: 2.690612 pts: 2.690612 pos: 155153 size: 2394
+ret: 0 st: 0 flags:1 dts: 2.690612 pts: 2.690612 pos: 155154 size: 2394
ret: 0 st: 0 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 1.541224 pts: 1.541224 pos: 59081 size: 1974
+ret: 0 st: 0 flags:1 dts: 1.541224 pts: 1.541224 pos: 59082 size: 1974
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.470204 pts: 0.470204 pos: 19352 size: 608
-ret:-1 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.470204 pts: 0.470204 pos: 19353 size: 608
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 8256 size: 614
diff --git a/tests/ref/seek/acodec-pcm-f32be b/tests/ref/seek/acodec-pcm-f32be
index 886356a1a2..b838262b58 100644
--- a/tests/ref/seek/acodec-pcm-f32be
+++ b/tests/ref/seek/acodec-pcm-f32be
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 668288 size: 8192
+ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 668296 size: 8192
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 278152 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 278160 size: 8192
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 909072 size: 8192
+ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 909080 size: 8192
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 518936 size: 8192
+ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 518944 size: 8192
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 128800 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 128808 size: 8192
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 759720 size: 8192
+ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 759728 size: 8192
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 369584 size: 8192
+ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 369592 size: 8192
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st: 0 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos:1000504 size: 8192
+ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos:1000512 size: 8192
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 610368 size: 8192
+ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 610376 size: 8192
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 220232 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 220240 size: 8192
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st: 0 flags:1 ts: 2.412494
-ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 851152 size: 8192
+ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 851160 size: 8192
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 461016 size: 8192
+ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 461024 size: 8192
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 70880 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 70888 size: 8192
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st: 0 flags:1 ts: 1.989184
-ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 701808 size: 8192
+ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 701816 size: 8192
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 311664 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 311672 size: 8192
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
ret: 0 st: 0 flags:0 ts: 2.671678
-ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 942592 size: 8192
+ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 942600 size: 8192
ret: 0 st: 0 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 552456 size: 8192
+ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 552464 size: 8192
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 162312 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 162320 size: 8192
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 8192
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 8192
diff --git a/tests/ref/seek/acodec-pcm-f64be b/tests/ref/seek/acodec-pcm-f64be
index 9be3b4ec16..82223517d5 100644
--- a/tests/ref/seek/acodec-pcm-f64be
+++ b/tests/ref/seek/acodec-pcm-f64be
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos:1336552 size: 16384
+ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos:1336560 size: 16384
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 556280 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 556288 size: 16384
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos:1818120 size: 16384
+ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos:1818128 size: 16384
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos:1037848 size: 16384
+ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos:1037856 size: 16384
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 257576 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 257584 size: 16384
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos:1519416 size: 16384
+ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos:1519424 size: 16384
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 739144 size: 16384
+ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 739152 size: 16384
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st: 0 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos:2000984 size: 16384
+ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos:2000992 size: 16384
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos:1220712 size: 16384
+ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos:1220720 size: 16384
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 440440 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 440448 size: 16384
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st: 0 flags:1 ts: 2.412494
-ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos:1702280 size: 16384
+ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos:1702288 size: 16384
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 922008 size: 16384
+ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 922016 size: 16384
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 141736 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 141744 size: 16384
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st: 0 flags:1 ts: 1.989184
-ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos:1403592 size: 16384
+ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos:1403600 size: 16384
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 623304 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 623312 size: 16384
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
ret: 0 st: 0 flags:0 ts: 2.671678
-ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos:1885160 size: 16384
+ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos:1885168 size: 16384
ret: 0 st: 0 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos:1104888 size: 16384
+ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos:1104896 size: 16384
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 324600 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 324608 size: 16384
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 16384
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 16384
diff --git a/tests/ref/seek/acodec-pcm-s16le b/tests/ref/seek/acodec-pcm-s16le
index 4f1ffc5acd..41acc98d8d 100644
--- a/tests/ref/seek/acodec-pcm-s16le
+++ b/tests/ref/seek/acodec-pcm-s16le
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 334178 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 334176 size: 4096
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 139110 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 139108 size: 4096
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 454570 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 454568 size: 4096
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 259502 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 259500 size: 4096
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 64434 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 64432 size: 4096
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 379894 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 379892 size: 4096
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 184826 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 184824 size: 4096
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 500286 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 500284 size: 4096
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 305218 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 305216 size: 4096
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 110150 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 110148 size: 4096
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.412494
-ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 425610 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 425608 size: 4096
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 230542 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 230540 size: 4096
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 35474 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 35472 size: 4096
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 1.989184
-ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 350938 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 350936 size: 4096
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 155866 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 155864 size: 4096
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:0 ts: 2.671678
-ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 471330 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 471328 size: 4096
ret: 0 st: 0 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 276262 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 276260 size: 4096
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 81190 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 81188 size: 4096
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
diff --git a/tests/ref/seek/acodec-pcm-u8 b/tests/ref/seek/acodec-pcm-u8
index 8348916432..afa33519d7 100644
--- a/tests/ref/seek/acodec-pcm-u8
+++ b/tests/ref/seek/acodec-pcm-u8
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 167112 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 167110 size: 4096
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69578 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69576 size: 4096
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 227308 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 227306 size: 4096
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 129774 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 129772 size: 4096
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32240 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32238 size: 4096
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 189970 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 189968 size: 4096
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 92436 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 92434 size: 4096
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 250166 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 250164 size: 4096
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 152632 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 152630 size: 4096
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55098 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55096 size: 4096
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.412494
-ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 212828 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 212826 size: 4096
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 115294 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 115292 size: 4096
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17760 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17758 size: 4096
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 1.989184
-ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 175492 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 175490 size: 4096
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77956 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77954 size: 4096
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:0 ts: 2.671678
-ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 235688 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 235686 size: 4096
ret: 0 st: 0 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 138154 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 138152 size: 4096
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40618 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40616 size: 4096
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
diff --git a/tests/ref/seek/cache-pipe b/tests/ref/seek/cache-pipe
new file mode 100644
index 0000000000..ebe5946601
--- /dev/null
+++ b/tests/ref/seek/cache-pipe
@@ -0,0 +1,49 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos: 31544 size: 418
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.809796 pts: 0.809796 pos: 14407 size: 418
+ret:-1 st: 0 flags:1 ts:-0.317499
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 2.586122 pts: 2.586122 pos: 42828 size: 418
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.462857 pts: 1.462857 pos: 24856 size: 418
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 7302 size: 418
+ret:-1 st: 0 flags:1 ts:-0.740831
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 2.168163 pts: 2.168163 pos: 36141 size: 418
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.044898 pts: 1.044898 pos: 18169 size: 418
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 2.821224 pts: 2.821224 pos: 46590 size: 418
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.750204 pts: 1.750204 pos: 29454 size: 418
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.600816 pts: 0.600816 pos: 11064 size: 418
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 2.403265 pts: 2.403265 pos: 39903 size: 418
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.332245 pts: 1.332245 pos: 22766 size: 418
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.182857 pts: 0.182857 pos: 4376 size: 418
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.985306 pts: 1.985306 pos: 33215 size: 418
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.888163 pts: 0.888163 pos: 15661 size: 418
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 dts: 2.690612 pts: 2.690612 pos: 44500 size: 418
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.541224 pts: 1.541224 pos: 26110 size: 418
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.470204 pts: 0.470204 pos: 8974 size: 418
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/extra-mp3 b/tests/ref/seek/extra-mp3
new file mode 100644
index 0000000000..fdfb1a7c66
--- /dev/null
+++ b/tests/ref/seek/extra-mp3
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.880816 pts: 1.880816 pos: 31544 size: 418
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.809796 pts: 0.809796 pos: 14407 size: 418
+ret: 0 st: 0 flags:1 ts:-0.317499
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 2.586122 pts: 2.586122 pos: 42828 size: 418
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.462857 pts: 1.462857 pos: 24856 size: 418
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.365714 pts: 0.365714 pos: 7302 size: 418
+ret: 0 st: 0 flags:1 ts:-0.740831
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 2.168163 pts: 2.168163 pos: 36141 size: 418
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.044898 pts: 1.044898 pos: 18169 size: 418
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 2.821224 pts: 2.821224 pos: 46590 size: 418
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.750204 pts: 1.750204 pos: 29454 size: 418
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.600816 pts: 0.600816 pos: 11064 size: 418
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 2.403265 pts: 2.403265 pos: 39903 size: 418
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.332245 pts: 1.332245 pos: 22766 size: 418
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.182857 pts: 0.182857 pos: 4376 size: 418
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.985306 pts: 1.985306 pos: 33215 size: 418
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.888163 pts: 0.888163 pos: 15661 size: 418
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
+ret: 0 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 dts: 2.690612 pts: 2.690612 pos: 44500 size: 418
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.567347 pts: 1.567347 pos: 26528 size: 418
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.470204 pts: 0.470204 pos: 8974 size: 418
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1451 size: 417
diff --git a/tests/ref/seek/extra-mp4 b/tests/ref/seek/extra-mp4
new file mode 100644
index 0000000000..c25544c095
--- /dev/null
+++ b/tests/ref/seek/extra-mp4
@@ -0,0 +1,134 @@
+ret: 0 st: 0 flags:1 dts:-0.033333 pts: 0.000000 pos: 1287 size: 183
+ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.033333 pos: 1470 size: 24
+ret: 0 st: 0 flags:0 dts: 0.033333 pts: 0.066667 pos: 1494 size: 6779
+ret: 0 st: 0 flags:0 dts: 0.066667 pts: 0.100000 pos: 8273 size: 11041
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts:-0.033333 pts: 0.000000 pos: 1287 size: 183
+ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.033333 pos: 1470 size: 24
+ret: 0 st: 0 flags:0 dts: 0.033333 pts: 0.066667 pos: 1494 size: 6779
+ret: 0 st: 0 flags:0 dts: 0.066667 pts: 0.100000 pos: 8273 size: 11041
+ret: 0 st:-1 flags:1 ts: 101.894167
+ret: 0 st: 0 flags:1 dts: 101.300000 pts: 101.333333 pos:10982311 size: 67237
+ret: 0 st: 0 flags:0 dts: 101.333333 pts: 101.433333 pos:11049548 size: 3524
+ret: 0 st: 0 flags:0 dts: 101.366667 pts: 101.366667 pos:11053072 size: 562
+ret: 0 st: 0 flags:0 dts: 101.400000 pts: 101.400000 pos:11053634 size: 599
+ret: 0 st: 0 flags:0 ts: 24.788333
+ret: 0 st: 0 flags:1 dts: 25.300000 pts: 25.333333 pos:2607246 size: 40273
+ret: 0 st: 0 flags:0 dts: 25.333333 pts: 25.433333 pos:2647519 size: 2959
+ret: 0 st: 0 flags:0 dts: 25.366667 pts: 25.366667 pos:2650478 size: 197
+ret: 0 st: 0 flags:0 dts: 25.400000 pts: 25.400000 pos:2650675 size: 230
+ret: 0 st: 0 flags:1 ts: 127.682500
+ret: 0 st: 0 flags:1 dts: 126.633333 pts: 126.666667 pos:13359975 size: 68741
+ret: 0 st: 0 flags:0 dts: 126.666667 pts: 126.766667 pos:13428716 size: 2914
+ret: 0 st: 0 flags:0 dts: 126.700000 pts: 126.700000 pos:13431630 size: 781
+ret: 0 st: 0 flags:0 dts: 126.733333 pts: 126.733333 pos:13432411 size: 817
+ret: 0 st:-1 flags:0 ts: 50.576668
+ret: 0 st: 0 flags:1 dts: 50.600000 pts: 50.633333 pos:5858254 size: 67903
+ret: 0 st: 0 flags:0 dts: 50.633333 pts: 50.733333 pos:5926157 size: 1307
+ret: 0 st: 0 flags:0 dts: 50.666667 pts: 50.666667 pos:5927464 size: 150
+ret: 0 st: 0 flags:0 dts: 50.700000 pts: 50.700000 pos:5927614 size: 176
+ret: 0 st:-1 flags:1 ts: 153.470835
+ret: 0 st: 0 flags:1 dts: 153.466667 pts: 153.500000 pos:15867700 size: 96169
+ret: 0 st: 0 flags:0 dts: 153.500000 pts: 153.533333 pos:15963869 size: 785
+ret: 0 st: 0 flags:0 dts: 153.533333 pts: 153.633333 pos:15964654 size: 3135
+ret: 0 st: 0 flags:0 dts: 153.566667 pts: 153.566667 pos:15967789 size: 859
+ret: 0 st: 0 flags:0 ts: 76.365000
+ret: 0 st: 0 flags:1 dts: 77.833333 pts: 77.866667 pos:8659657 size: 41182
+ret: 0 st: 0 flags:0 dts: 77.866667 pts: 77.966667 pos:8700839 size: 4197
+ret: 0 st: 0 flags:0 dts: 77.900000 pts: 77.900000 pos:8705036 size: 653
+ret: 0 st: 0 flags:0 dts: 77.933333 pts: 77.933333 pos:8705689 size: 751
+ret: 0 st: 0 flags:1 ts:-0.740833
+ret: 0 st: 0 flags:1 dts:-0.033333 pts: 0.000000 pos: 1287 size: 183
+ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.033333 pos: 1470 size: 24
+ret: 0 st: 0 flags:0 dts: 0.033333 pts: 0.066667 pos: 1494 size: 6779
+ret: 0 st: 0 flags:0 dts: 0.066667 pts: 0.100000 pos: 8273 size: 11041
+ret: 0 st:-1 flags:0 ts: 102.153336
+ret: 0 st: 0 flags:1 dts: 104.066667 pts: 104.100000 pos:11116461 size:112929
+ret: 0 st: 0 flags:0 dts: 104.100000 pts: 104.133333 pos:11229390 size: 585
+ret: 0 st: 0 flags:0 dts: 104.133333 pts: 104.166667 pos:11229975 size: 797
+ret: 0 st: 0 flags:0 dts: 104.166667 pts: 104.200000 pos:11230772 size: 810
+ret: 0 st:-1 flags:1 ts: 25.047503
+ret: 0 st: 0 flags:1 dts: 20.233333 pts: 20.266667 pos:2223959 size: 51823
+ret: 0 st: 0 flags:0 dts: 20.266667 pts: 20.300000 pos:2275782 size: 488
+ret: 0 st: 0 flags:0 dts: 20.300000 pts: 20.400000 pos:2276270 size: 670
+ret: 0 st: 0 flags:0 dts: 20.333333 pts: 20.333333 pos:2276940 size: 84
+ret: 0 st: 0 flags:0 ts: 127.941667
+ret: 0 st: 0 flags:1 dts: 131.233333 pts: 131.266667 pos:13727953 size: 62229
+ret: 0 st: 0 flags:0 dts: 131.266667 pts: 131.366667 pos:13790182 size: 2349
+ret: 0 st: 0 flags:0 dts: 131.300000 pts: 131.300000 pos:13792531 size: 571
+ret: 0 st: 0 flags:0 dts: 131.333333 pts: 131.333333 pos:13793102 size: 1190
+ret: 0 st: 0 flags:1 ts: 50.835833
+ret: 0 st: 0 flags:1 dts: 50.600000 pts: 50.633333 pos:5858254 size: 67903
+ret: 0 st: 0 flags:0 dts: 50.633333 pts: 50.733333 pos:5926157 size: 1307
+ret: 0 st: 0 flags:0 dts: 50.666667 pts: 50.666667 pos:5927464 size: 150
+ret: 0 st: 0 flags:0 dts: 50.700000 pts: 50.700000 pos:5927614 size: 176
+ret: 0 st:-1 flags:0 ts: 153.730004
+ret: 0 st: 0 flags:1 dts: 157.033333 pts: 157.066667 pos:16225365 size: 82738
+ret: 0 st: 0 flags:0 dts: 157.066667 pts: 157.166667 pos:16308103 size: 2273
+ret: 0 st: 0 flags:0 dts: 157.100000 pts: 157.100000 pos:16310376 size: 350
+ret: 0 st: 0 flags:0 dts: 157.133333 pts: 157.133333 pos:16310726 size: 337
+ret: 0 st:-1 flags:1 ts: 76.624171
+ret: 0 st: 0 flags:1 dts: 75.966667 pts: 76.000000 pos:8520178 size: 94395
+ret: 0 st: 0 flags:0 dts: 76.000000 pts: 76.100000 pos:8614573 size: 483
+ret: 0 st: 0 flags:0 dts: 76.033333 pts: 76.033333 pos:8615056 size: 37
+ret: 0 st: 0 flags:0 dts: 76.066667 pts: 76.066667 pos:8615093 size: 56
+ret: 0 st: 0 flags:0 ts:-0.481667
+ret: 0 st: 0 flags:1 dts:-0.033333 pts: 0.000000 pos: 1287 size: 183
+ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.033333 pos: 1470 size: 24
+ret: 0 st: 0 flags:0 dts: 0.033333 pts: 0.066667 pos: 1494 size: 6779
+ret: 0 st: 0 flags:0 dts: 0.066667 pts: 0.100000 pos: 8273 size: 11041
+ret: 0 st: 0 flags:1 ts: 102.412500
+ret: 0 st: 0 flags:1 dts: 101.300000 pts: 101.333333 pos:10982311 size: 67237
+ret: 0 st: 0 flags:0 dts: 101.333333 pts: 101.433333 pos:11049548 size: 3524
+ret: 0 st: 0 flags:0 dts: 101.366667 pts: 101.366667 pos:11053072 size: 562
+ret: 0 st: 0 flags:0 dts: 101.400000 pts: 101.400000 pos:11053634 size: 599
+ret: 0 st:-1 flags:0 ts: 25.306672
+ret: 0 st: 0 flags:1 dts: 27.400000 pts: 27.433333 pos:2674605 size:127383
+ret: 0 st: 0 flags:0 dts: 27.433333 pts: 27.466667 pos:2801988 size: 68
+ret: 0 st: 0 flags:0 dts: 27.466667 pts: 27.500000 pos:2802268 size: 1754
+ret: 0 st: 0 flags:0 dts: 27.500000 pts: 27.533333 pos:2804022 size: 4071
+ret: 0 st:-1 flags:1 ts: 128.200839
+ret: 0 st: 0 flags:1 dts: 127.833333 pts: 127.866667 pos:13514072 size: 67382
+ret: 0 st: 0 flags:0 dts: 127.866667 pts: 127.966667 pos:13581454 size: 2936
+ret: 0 st: 0 flags:0 dts: 127.900000 pts: 127.900000 pos:13584390 size: 451
+ret: 0 st: 0 flags:0 dts: 127.933333 pts: 127.933333 pos:13584841 size: 537
+ret: 0 st: 0 flags:0 ts: 51.095011
+ret: 0 st: 0 flags:1 dts: 52.033333 pts: 52.066667 pos:6028050 size:115809
+ret: 0 st: 0 flags:0 dts: 52.066667 pts: 52.166667 pos:6143859 size: 1620
+ret: 0 st: 0 flags:0 dts: 52.100000 pts: 52.100000 pos:6145479 size: 92
+ret: 0 st: 0 flags:0 dts: 52.133333 pts: 52.133333 pos:6145571 size: 533
+ret: 0 st: 0 flags:1 ts: 153.989178
+ret: 0 st: 0 flags:1 dts: 153.466667 pts: 153.500000 pos:15867700 size: 96169
+ret: 0 st: 0 flags:0 dts: 153.500000 pts: 153.533333 pos:15963869 size: 785
+ret: 0 st: 0 flags:0 dts: 153.533333 pts: 153.633333 pos:15964654 size: 3135
+ret: 0 st: 0 flags:0 dts: 153.566667 pts: 153.566667 pos:15967789 size: 859
+ret: 0 st:-1 flags:0 ts: 76.883340
+ret: 0 st: 0 flags:1 dts: 77.833333 pts: 77.866667 pos:8659657 size: 41182
+ret: 0 st: 0 flags:0 dts: 77.866667 pts: 77.966667 pos:8700839 size: 4197
+ret: 0 st: 0 flags:0 dts: 77.900000 pts: 77.900000 pos:8705036 size: 653
+ret: 0 st: 0 flags:0 dts: 77.933333 pts: 77.933333 pos:8705689 size: 751
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts:-0.033333 pts: 0.000000 pos: 1287 size: 183
+ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.033333 pos: 1470 size: 24
+ret: 0 st: 0 flags:0 dts: 0.033333 pts: 0.066667 pos: 1494 size: 6779
+ret: 0 st: 0 flags:0 dts: 0.066667 pts: 0.100000 pos: 8273 size: 11041
+ret: 0 st: 0 flags:0 ts: 102.671678
+ret: 0 st: 0 flags:1 dts: 104.066667 pts: 104.100000 pos:11116461 size:112929
+ret: 0 st: 0 flags:0 dts: 104.100000 pts: 104.133333 pos:11229390 size: 585
+ret: 0 st: 0 flags:0 dts: 104.133333 pts: 104.166667 pos:11229975 size: 797
+ret: 0 st: 0 flags:0 dts: 104.166667 pts: 104.200000 pos:11230772 size: 810
+ret: 0 st: 0 flags:1 ts: 25.565844
+ret: 0 st: 0 flags:1 dts: 25.300000 pts: 25.333333 pos:2607246 size: 40273
+ret: 0 st: 0 flags:0 dts: 25.333333 pts: 25.433333 pos:2647519 size: 2959
+ret: 0 st: 0 flags:0 dts: 25.366667 pts: 25.366667 pos:2650478 size: 197
+ret: 0 st: 0 flags:0 dts: 25.400000 pts: 25.400000 pos:2650675 size: 230
+ret: 0 st:-1 flags:0 ts: 128.460008
+ret: 0 st: 0 flags:1 dts: 131.233333 pts: 131.266667 pos:13727953 size: 62229
+ret: 0 st: 0 flags:0 dts: 131.266667 pts: 131.366667 pos:13790182 size: 2349
+ret: 0 st: 0 flags:0 dts: 131.300000 pts: 131.300000 pos:13792531 size: 571
+ret: 0 st: 0 flags:0 dts: 131.333333 pts: 131.333333 pos:13793102 size: 1190
+ret: 0 st:-1 flags:1 ts: 51.354175
+ret: 0 st: 0 flags:1 dts: 50.600000 pts: 50.633333 pos:5858254 size: 67903
+ret: 0 st: 0 flags:0 dts: 50.633333 pts: 50.733333 pos:5926157 size: 1307
+ret: 0 st: 0 flags:0 dts: 50.666667 pts: 50.666667 pos:5927464 size: 150
+ret: 0 st: 0 flags:0 dts: 50.700000 pts: 50.700000 pos:5927614 size: 176
diff --git a/tests/ref/seek/lavf-aiff b/tests/ref/seek/lavf-aiff
index 784b1448ae..eb9ada0b79 100644
--- a/tests/ref/seek/lavf-aiff
+++ b/tests/ref/seek/lavf-aiff
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st:-1 flags:1 ts: 1.894167
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69586 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69602 size: 4096
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st:-1 flags:0 ts: 2.576668
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.470835
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32248 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32264 size: 4096
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st:-1 flags:0 ts: 2.153336
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.047503
ret:-EOF
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st: 0 flags:1 ts: 2.835828
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.730004
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55106 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55122 size: 4096
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st: 0 flags:1 ts: 2.412494
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.306672
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17768 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17784 size: 4096
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st: 0 flags:1 ts: 1.989184
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77964 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77980 size: 4096
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
ret: 0 st: 0 flags:0 ts: 2.671678
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.565850
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40626 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40642 size: 4096
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 54 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 70 size: 4096
diff --git a/tests/ref/seek/lavf-asf b/tests/ref/seek/lavf-asf
index 3da2c739ef..b64bec3ac3 100644
--- a/tests/ref/seek/lavf-asf
+++ b/tests/ref/seek/lavf-asf
@@ -1,53 +1,53 @@
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 1 flags:1 dts: 0.261000 pts: 0.261000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.470000 pts: 0.470000 pos: 147893 size: 209
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 1 flags:1 dts: 0.732000 pts: 0.732000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.470000 pts: 0.470000 pos: 147893 size: 209
ret: 0 st: 0 flags:1 ts:-0.317000
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st: 1 flags:0 ts: 2.577000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 330293 size: 209
ret: 0 st: 1 flags:1 ts: 1.471000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 330293 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 1 flags:1 dts: 0.261000 pts: 0.261000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.470000 pts: 0.470000 pos: 147893 size: 209
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st: 0 flags:0 ts: 2.153000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: 301493 size: 209
ret: 0 st: 0 flags:1 ts: 1.048000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: 301493 size: 209
ret: 0 st: 1 flags:0 ts:-0.058000
-ret: 0 st: 1 flags:1 dts: 0.261000 pts: 0.261000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st: 1 flags:1 ts: 2.836000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 330293 size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: 301493 size: 209
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 1 flags:1 dts: 0.470000 pts: 0.470000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 1 flags:1 dts: 0.732000 pts: 0.732000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: 301493 size: 209
ret: 0 st: 1 flags:0 ts: 1.307000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 330293 size: 209
ret: 0 st: 1 flags:1 ts: 0.201000
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: 301493 size: 209
ret: 0 st: 0 flags:0 ts: 0.883000
-ret: 0 st: 1 flags:1 dts: 0.732000 pts: 0.732000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.470000 pts: 0.470000 pos: 147893 size: 209
ret: 0 st: 0 flags:1 ts:-0.222000
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
ret: 0 st: 1 flags:0 ts: 2.672000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 330293 size: 209
ret: 0 st: 1 flags:1 ts: 1.566000
-ret: 0 st: 1 flags:1 dts: 0.941000 pts: 0.941000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 330293 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 1 flags:1 dts: 0.261000 pts: 0.261000 pos: -1 size: 209
+ret: 0 st: 1 flags:1 dts: 0.470000 pts: 0.470000 pos: 147893 size: 209
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 693 size: 208
diff --git a/tests/ref/seek/lavf-au b/tests/ref/seek/lavf-au
index a2c57eb786..8edce58f65 100644
--- a/tests/ref/seek/lavf-au
+++ b/tests/ref/seek/lavf-au
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st:-1 flags:1 ts: 1.894167
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69556 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69572 size: 2048
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st:-1 flags:0 ts: 2.576668
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.470835
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32218 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32234 size: 2048
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st:-1 flags:0 ts: 2.153336
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.047503
ret:-EOF
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st: 0 flags:1 ts: 2.835828
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.730004
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55076 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55092 size: 2048
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st: 0 flags:1 ts: 2.412494
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.306672
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17738 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17754 size: 2048
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st: 0 flags:1 ts: 1.989184
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77934 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77950 size: 2048
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
ret: 0 st: 0 flags:0 ts: 2.671678
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.565850
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40596 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40612 size: 2048
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 24 size: 2048
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 40 size: 2048
diff --git a/tests/ref/seek/lavf-avi b/tests/ref/seek/lavf-avi
index 0cabe127ff..4f308d69fe 100644
--- a/tests/ref/seek/lavf-avi
+++ b/tests/ref/seek/lavf-avi
@@ -1,44 +1,44 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9896 size: 27867
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9934 size: 27867
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9896 size: 27867
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9934 size: 27867
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret:-1 st: 0 flags:1 ts:-0.320000
ret:-1 st: 1 flags:0 ts: 2.586122
ret: 0 st: 1 flags:1 ts: 1.462857
-ret: 0 st: 1 flags:1 dts: 0.992653 pts: 0.992653 pos: 329544 size: 209
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 156154 size: 27955
+ret: 0 st: 1 flags:1 dts: 0.470204 pts: 0.470204 pos: 155964 size: 209
ret:-1 st:-1 flags:1 ts:-0.740831
ret:-1 st: 0 flags:0 ts: 2.160000
ret: 0 st: 0 flags:1 ts: 1.040000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret: 0 st: 1 flags:0 ts:-0.052245
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 37772 size: 208
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9934 size: 27867
ret: 0 st: 1 flags:1 ts: 2.847347
-ret: 0 st: 1 flags:1 dts: 0.992653 pts: 0.992653 pos: 329544 size: 209
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
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.480000 pts: 0.480000 pos: 156154 size: 27955
+ret: 0 st: 1 flags:1 dts: 0.470204 pts: 0.470204 pos: 155964 size: 209
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9896 size: 27867
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9934 size: 27867
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret:-1 st: 1 flags:0 ts: 1.306122
ret: 0 st: 1 flags:1 ts: 0.208980
-ret: 0 st: 1 flags:1 dts: 0.208980 pts: 0.208980 pos: 92788 size: 209
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9934 size: 27867
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9896 size: 27867
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 9934 size: 27867
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret: 0 st: 0 flags:0 ts: 0.880000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret:-1 st: 0 flags:1 ts:-0.240000
ret:-1 st: 1 flags:0 ts: 2.664490
ret: 0 st: 1 flags:1 ts: 1.567347
-ret: 0 st: 1 flags:1 dts: 0.992653 pts: 0.992653 pos: 329544 size: 209
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301482 size: 27864
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 156154 size: 27955
+ret: 0 st: 1 flags:1 dts: 0.470204 pts: 0.470204 pos: 155964 size: 209
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-bmp b/tests/ref/seek/lavf-bmp
index d60729b24c..0f0b152fb8 100644
--- a/tests/ref/seek/lavf-bmp
+++ b/tests/ref/seek/lavf-bmp
@@ -5,7 +5,8 @@ ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:304182
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:304182
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:304182
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-dv_fmt b/tests/ref/seek/lavf-dv_fmt
index 3c49749a6b..0000ff5abe 100644
--- a/tests/ref/seek/lavf-dv_fmt
+++ b/tests/ref/seek/lavf-dv_fmt
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2880000 size:144000
ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 1 flags:0 ts: 2.576667
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 1 flags:1 ts: 1.470833
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1296000 size:144000
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:0 ts: 2.160000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 0 flags:1 ts: 1.040000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 1 flags:0 ts:-0.058333
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 1 flags:1 ts: 2.835833
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2304000 size:144000
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 1 flags:0 ts: 1.306667
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 1 flags:1 ts: 0.200833
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 0 flags:0 ts: 0.880000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3168000 size:144000
ret: 0 st: 0 flags:1 ts:-0.240000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 1 flags:0 ts: 2.671667
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st: 1 flags:1 ts: 1.565833
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3456000 size:144000
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1728000 size:144000
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
diff --git a/tests/ref/seek/lavf-ffm b/tests/ref/seek/lavf-ffm
new file mode 100644
index 0000000000..eceed1a2c2
--- /dev/null
+++ b/tests/ref/seek/lavf-ffm
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 1 flags:1 dts: 0.825011 pts: 0.825011 pos: 327680 size: 209
+ret: 0 st: 0 flags:1 ts:-0.317499
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st: 1 flags:0 ts: 2.576668
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 ts: 1.470835
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st:-1 flags:0 ts: 0.365002
+ret: 0 st: 1 flags:1 dts: 0.380930 pts: 0.380930 pos: 163840 size: 209
+ret: 0 st:-1 flags:1 ts:-0.740831
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st: 0 flags:0 ts: 2.153336
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 0 flags:1 ts: 1.047503
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 1 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st: 1 flags:1 ts: 2.835837
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 1 flags:1 dts: 0.642154 pts: 0.642154 pos: 274432 size: 209
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 1 flags:0 ts: 1.306672
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 ts: 0.200839
+ret: 0 st: 1 flags:1 dts: 0.224195 pts: 0.224195 pos: 114688 size: 209
+ret: 0 st:-1 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st:-1 flags:1 ts: 1.989173
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 0 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:0 dts: 0.880000 pts: 0.920000 pos: 339968 size: 12307
+ret: 0 st: 0 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
+ret: 0 st: 1 flags:0 ts: 2.671674
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 ts: 1.565841
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 1 flags:1 dts: 0.485420 pts: 0.485420 pos: 221184 size: 209
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24663
diff --git a/tests/ref/seek/lavf-flv_fmt b/tests/ref/seek/lavf-flv_fmt
index 77a106608a..9d86a811ea 100644
--- a/tests/ref/seek/lavf-flv_fmt
+++ b/tests/ref/seek/lavf-flv_fmt
@@ -1,44 +1,44 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 31074
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 205 size: 31074
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 31074
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 205 size: 31074
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
ret:-1 st: 0 flags:1 ts:-0.317000
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: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
ret: 0 st: 0 flags:0 ts: 0.365000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 149421 size: 31125
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 149444 size: 31125
ret:-1 st: 0 flags:1 ts:-0.741000
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: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
ret: 0 st: 0 flags:0 ts:-0.058000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 31074
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 205 size: 31074
ret: 0 st: 0 flags:1 ts: 2.836000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
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.480000 pts: 0.480000 pos: 149421 size: 31125
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 149444 size: 31125
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 31074
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 205 size: 31074
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
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.000000 pts: 0.000000 pos: 179 size: 31074
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 205 size: 31074
ret: 0 st: 0 flags:0 ts:-0.905000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 31074
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 205 size: 31074
ret: 0 st: 0 flags:1 ts: 1.989000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
ret:-1 st:-1 flags:1 ts:-0.222493
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: 0.960000 pts: 0.960000 pos: 298383 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 298404 size: 31134
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 149421 size: 31125
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 149444 size: 31125
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-gif b/tests/ref/seek/lavf-gif
index 883f18761e..9ce8308767 100644
--- a/tests/ref/seek/lavf-gif
+++ b/tests/ref/seek/lavf-gif
@@ -1,27 +1,40 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:2906401
-ret:-EINVAL st:-1 flags:0 ts:-1.000000
-ret:-EINVAL st:-1 flags:1 ts: 1.894167
-ret:-EINVAL st: 0 flags:0 ts: 0.800000
-ret:-EINVAL st: 0 flags:1 ts:-0.320000
-ret:-EINVAL st:-1 flags:0 ts: 2.576668
-ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
-ret:-EINVAL st: 0 flags:1 ts:-0.760000
-ret:-EINVAL st:-1 flags:0 ts: 2.153336
-ret:-EINVAL st:-1 flags:1 ts: 1.047503
-ret:-EINVAL st: 0 flags:0 ts:-0.040000
-ret:-EINVAL st: 0 flags:1 ts: 2.840000
-ret:-EINVAL st:-1 flags:0 ts: 1.730004
-ret:-EINVAL st:-1 flags:1 ts: 0.624171
-ret:-EINVAL st: 0 flags:0 ts:-0.480000
-ret:-EINVAL st: 0 flags:1 ts: 2.400000
-ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
-ret:-EINVAL st: 0 flags:0 ts:-0.920000
-ret:-EINVAL st: 0 flags:1 ts: 2.000000
-ret:-EINVAL st:-1 flags:0 ts: 0.883340
-ret:-EINVAL st:-1 flags:1 ts:-0.222493
-ret:-EINVAL st: 0 flags:0 ts: 2.680000
-ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
-ret:-EINVAL st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret:-1 st: 0 flags:0 ts: 0.790000
+ret:-1 st: 0 flags:1 ts:-0.320000
+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: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret:-1 st: 0 flags:0 ts: 0.370000
+ret:-1 st: 0 flags:1 ts:-0.740000
+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: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st: 0 flags:0 ts:-0.060000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+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.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st: 0 flags:1 ts: 2.410000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+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.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st: 0 flags:0 ts:-0.900000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret: 0 st: 0 flags:1 ts: 1.990000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret:-1 st:-1 flags:0 ts: 0.883340
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.670000
+ret: 0 st: 0 flags:1 ts: 1.570000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 81501
+ret:-1 st:-1 flags:0 ts: 0.460008
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-gxf b/tests/ref/seek/lavf-gxf
index c8f11c84d8..716246268b 100644
--- a/tests/ref/seek/lavf-gxf
+++ b/tests/ref/seek/lavf-gxf
@@ -2,52 +2,52 @@ ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 0 flags:0 ts: 0.780000
-ret: 0 st: 0 flags:0 dts: 0.800000 pts: NOPTS pos: 653352 size: 22148
+ret: 0 st: 0 flags:0 dts: 0.800000 pts: NOPTS pos: 653420 size: 22124
ret: 0 st: 0 flags:1 ts:-0.320000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st: 1 flags:0 ts: 2.580000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 1 flags:1 ts: 1.480000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 2 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:0 dts: 0.360000 pts: NOPTS pos: 302688 size: 25108
+ret: 0 st: 0 flags:0 dts: 0.360000 pts: NOPTS pos: 302672 size: 25116
ret: 0 st: 2 flags:1 ts:-0.740000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 0 flags:0 ts:-0.060000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 1 flags:0 ts: 1.740000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 1 flags:1 ts: 0.620000
-ret: 0 st: 0 flags:0 dts: 0.640000 pts: NOPTS pos: 497180 size: 21596
+ret: 0 st: 0 flags:0 dts: 0.640000 pts: NOPTS pos: 497196 size: 21612
ret: 0 st: 2 flags:0 ts:-0.480000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st: 2 flags:1 ts: 2.420000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:0 dts: 0.200000 pts: NOPTS pos: 209516 size: 22968
+ret: 0 st: 0 flags:0 dts: 0.200000 pts: NOPTS pos: 209504 size: 22964
ret: 0 st: 0 flags:0 ts:-0.900000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st: 0 flags:1 ts: 1.980000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 1 flags:0 ts: 0.880000
-ret: 0 st: 0 flags:0 dts: 0.880000 pts: NOPTS pos: 696068 size: 22484
+ret: 0 st: 0 flags:0 dts: 0.880000 pts: NOPTS pos: 696160 size: 21820
ret: 0 st: 1 flags:1 ts:-0.220000
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
ret: 0 st: 2 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st: 2 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741664 size: 54748
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 741124 size: 54736
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 370672 size: 54640
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 370700 size: 54628
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 5024 size: 65536
diff --git a/tests/ref/seek/lavf-jpg b/tests/ref/seek/lavf-jpg
index 88964cad05..545f59da57 100644
--- a/tests/ref/seek/lavf-jpg
+++ b/tests/ref/seek/lavf-jpg
@@ -1,11 +1,12 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 28070
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 25641
ret:-EINVAL st:-1 flags:0 ts:-1.000000
ret:-EINVAL st:-1 flags:1 ts: 1.894167
ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size: 25316
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size: 25788
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size: 25487
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-mkv b/tests/ref/seek/lavf-mkv
index 8267a2a255..cea34e99ac 100644
--- a/tests/ref/seek/lavf-mkv
+++ b/tests/ref/seek/lavf-mkv
@@ -1,53 +1,48 @@
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 633 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 834 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 849 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292271 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292271 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
ret: 0 st: 0 flags:1 ts:-0.317000
-ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 849 size: 27837
-ret: 0 st: 1 flags:0 ts: 2.577000
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
+ret:-1 st: 1 flags:0 ts: 2.577000
ret: 0 st: 1 flags:1 ts: 1.471000
-ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320112 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320317 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146824 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147023 size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 849 size: 27837
-ret: 0 st: 0 flags:0 ts: 2.153000
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
+ret:-1 st: 0 flags:0 ts: 2.153000
ret: 0 st: 0 flags:1 ts: 1.048000
-ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292271 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
ret: 0 st: 1 flags:0 ts:-0.058000
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 633 size: 208
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 834 size: 208
ret: 0 st: 1 flags:1 ts: 2.836000
-ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320112 size: 209
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret:-EOF
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320317 size: 209
+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.491000 pts: 0.491000 pos: 146824 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147023 size: 27925
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 849 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292271 size: 27834
-ret: 0 st: 1 flags:0 ts: 1.307000
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
+ret:-1 st: 1 flags:0 ts: 1.307000
ret: 0 st: 1 flags:1 ts: 0.201000
-ret: 0 st: 1 flags:1 dts: 0.183000 pts: 0.183000 pos: 72204 size: 209
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 834 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 849 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292271 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
ret: 0 st: 0 flags:0 ts: 0.883000
-ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292271 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.971000 pts: 0.971000 pos: 292476 size: 27834
ret: 0 st: 0 flags:1 ts:-0.222000
-ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 849 size: 27837
-ret: 0 st: 1 flags:0 ts: 2.672000
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
+ret:-1 st: 1 flags:0 ts: 2.672000
ret: 0 st: 1 flags:1 ts: 1.566000
-ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320112 size: 209
+ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 320317 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 146824 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.491000 pts: 0.491000 pos: 147023 size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 849 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.011000 pts: 0.011000 pos: 1050 size: 27837
diff --git a/tests/ref/seek/lavf-mmf b/tests/ref/seek/lavf-mmf
index 196d2632a0..0bc98fa9e3 100644
--- a/tests/ref/seek/lavf-mmf
+++ b/tests/ref/seek/lavf-mmf
@@ -1,27 +1,44 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size: 4096
-ret:-1 st:-1 flags:0 ts:-1.000000
-ret:-1 st:-1 flags:1 ts: 1.894167
-ret:-1 st: 0 flags:0 ts: 0.788345
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 83 size: 4096
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 83 size: 4096
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
+ret: 0 st: 0 flags:0 ts: 0.788345
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
ret:-1 st: 0 flags:1 ts:-0.317506
ret:-1 st:-1 flags:0 ts: 2.576668
-ret:-1 st:-1 flags:1 ts: 1.470835
-ret:-1 st: 0 flags:0 ts: 0.365011
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
+ret: 0 st: 0 flags:0 ts: 0.365011
+ret: 0 st: 0 flags:1 dts: 0.371519 pts: 0.371519 pos: 8275 size: 4096
ret:-1 st: 0 flags:1 ts:-0.740839
ret:-1 st:-1 flags:0 ts: 2.153336
-ret:-1 st:-1 flags:1 ts: 1.047503
-ret:-1 st: 0 flags:0 ts:-0.058322
-ret:-1 st: 0 flags:1 ts: 2.835828
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
+ret: 0 st: 0 flags:0 ts:-0.058322
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 83 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.835828
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
ret:-1 st:-1 flags:0 ts: 1.730004
-ret:-1 st:-1 flags:1 ts: 0.624171
-ret:-1 st: 0 flags:0 ts:-0.481655
-ret:-1 st: 0 flags:1 ts: 2.412494
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.557279 pts: 0.557279 pos: 12371 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.481655
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 83 size: 4096
+ret: 0 st: 0 flags:1 ts: 2.412494
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
ret:-1 st:-1 flags:0 ts: 1.306672
-ret:-1 st:-1 flags:1 ts: 0.200839
-ret:-1 st: 0 flags:0 ts:-0.904989
-ret:-1 st: 0 flags:1 ts: 1.989184
-ret:-1 st:-1 flags:0 ts: 0.883340
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.185760 pts: 0.185760 pos: 4179 size: 4096
+ret: 0 st: 0 flags:0 ts:-0.904989
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 83 size: 4096
+ret: 0 st: 0 flags:1 ts: 1.989184
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.671678
-ret:-1 st: 0 flags:1 ts: 1.565850
-ret:-1 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 ts: 1.565850
+ret: 0 st: 0 flags:1 dts: 0.928798 pts: 0.928798 pos: 20563 size: 2048
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.557279 pts: 0.557279 pos: 12371 size: 4096
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-mov b/tests/ref/seek/lavf-mov
index 0091915e19..27ea7c7730 100644
--- a/tests/ref/seek/lavf-mov
+++ b/tests/ref/seek/lavf-mov
@@ -1,48 +1,48 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 325248 size: 1024
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326272 size: 27834
-ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
+ret: 0 st: 0 flags:0 ts: 0.788359
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
+ret: 0 st: 0 flags:1 ts:-0.317500
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret:-1 st: 1 flags:0 ts: 2.576667
ret: 0 st: 1 flags:1 ts: 1.470839
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326272 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 163526 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165249 size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
-ret:-1 st: 0 flags:0 ts: 2.160000
-ret: 0 st: 0 flags:1 ts: 1.040000
-ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 325248 size: 1024
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
+ret:-1 st: 0 flags:0 ts: 2.153359
+ret: 0 st: 0 flags:1 ts: 1.047500
+ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
ret: 0 st: 1 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st: 1 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326272 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret:-1 st:-1 flags:0 ts: 1.730004
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 1 flags:1 dts: 0.464399 pts: 0.464399 pos: 162502 size: 1024
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 325248 size: 1024
+ret: 0 st: 1 flags:1 dts: 0.464399 pts: 0.464399 pos: 164225 size: 1024
+ret: 0 st: 0 flags:0 ts:-0.481641
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
+ret: 0 st: 0 flags:1 ts: 2.412500
+ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
ret:-1 st: 1 flags:0 ts: 1.306667
ret: 0 st: 1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 325248 size: 1024
-ret: 0 st: 0 flags:0 ts: 0.880000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326272 size: 27834
-ret: 0 st: 0 flags:1 ts:-0.240000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.952018 pts: 0.952018 pos: 326971 size: 1024
+ret: 0 st: 0 flags:0 ts: 0.883359
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
+ret: 0 st: 0 flags:1 ts:-0.222500
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
ret:-1 st: 1 flags:0 ts: 2.671678
ret: 0 st: 1 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326272 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 327995 size: 27834
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 163526 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 165249 size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 1767 size: 27837
diff --git a/tests/ref/seek/lavf-mpg b/tests/ref/seek/lavf-mpg
index 6e27064684..e804b84739 100644
--- a/tests/ref/seek/lavf-mpg
+++ b/tests/ref/seek/lavf-mpg
@@ -1,53 +1,53 @@
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:0 dts: 1.880000 pts: 1.920000 pos: 315392 size: 12800
+ret: 0 st: 1 flags:1 dts: 1.051544 pts: 1.051544 pos: 342028 size: 314
ret: 0 st: 0 flags:0 ts: 0.788333
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 0 flags:0 dts: 0.820000 pts: 0.860000 pos: 118784 size: 14717
ret: 0 st: 0 flags:1 ts:-0.317500
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st: 1 flags:0 ts: 2.576667
-ret: 0 st: 1 flags:1 dts: 1.812767 pts: 1.812767 pos: 368652 size: 379
+ret: 0 st: 1 flags:1 dts: 1.312767 pts: 1.312767 pos: 368652 size: 379
ret: 0 st: 1 flags:1 ts: 1.470833
-ret: 0 st: 1 flags:1 dts: 1.290322 pts: 1.290322 pos: 145408 size: 261
+ret: 0 st: 1 flags:1 dts: 1.312767 pts: 1.312767 pos: 368652 size: 379
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st: 0 flags:0 ts: 2.153333
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 2.000000 pos: 339968 size: 681
+ret: 0 st: 1 flags:1 dts: 1.051544 pts: 1.051544 pos: 342028 size: 314
ret: 0 st: 0 flags:1 ts: 1.047500
-ret: 0 st: 0 flags:0 dts: 1.040000 pts: 1.080000 pos: 26624 size: 16303
+ret: 0 st: 0 flags:0 dts: 1.020000 pts: 1.060000 pos: 196608 size: 17639
ret: 0 st: 1 flags:0 ts:-0.058333
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st: 1 flags:1 ts: 2.835833
-ret: 0 st: 1 flags:1 dts: 1.812767 pts: 1.812767 pos: 368652 size: 379
+ret: 0 st: 1 flags:1 dts: 1.312767 pts: 1.312767 pos: 368652 size: 379
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:0 dts: 1.760000 pts: 1.800000 pos: 280588 size: 13050
+ret: 0 st: 1 flags:1 dts: 1.051544 pts: 1.051544 pos: 342028 size: 314
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 0 flags:0 dts: 0.620000 pts: 0.660000 pos: 55296 size: 14239
ret: 0 st: 0 flags:0 ts:-0.481667
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st: 0 flags:1 ts: 2.412500
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 2.000000 pos: 339968 size: 681
+ret: 0 st: 1 flags:1 dts: 1.051544 pts: 1.051544 pos: 342028 size: 314
ret: 0 st: 1 flags:0 ts: 1.306667
-ret: 0 st: 1 flags:1 dts: 1.551544 pts: 1.551544 pos: 342028 size: 314
+ret: 0 st: 1 flags:1 dts: 1.312767 pts: 1.312767 pos: 368652 size: 379
ret: 0 st: 1 flags:1 ts: 0.200844
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 2.000000 pos: 339968 size: 681
+ret: 0 st: 1 flags:1 dts: 1.051544 pts: 1.051544 pos: 342028 size: 314
ret: 0 st: 0 flags:0 ts: 0.883344
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 0 flags:0 dts: 0.900000 pts: 0.940000 pos: 147456 size: 12755
ret: 0 st: 0 flags:1 ts:-0.222489
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st: 1 flags:0 ts: 2.671678
-ret: 0 st: 1 flags:1 dts: 1.812767 pts: 1.812767 pos: 368652 size: 379
+ret: 0 st: 1 flags:1 dts: 1.312767 pts: 1.312767 pos: 368652 size: 379
ret: 0 st: 1 flags:1 ts: 1.565844
-ret: 0 st: 1 flags:1 dts: 1.551544 pts: 1.551544 pos: 342028 size: 314
+ret: 0 st: 1 flags:1 dts: 1.312767 pts: 1.312767 pos: 368652 size: 379
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 1 flags:1 dts: 1.029089 pts: 1.029089 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.529089 pts: 0.529089 pos: 2048 size: 208
diff --git a/tests/ref/seek/lavf-mxf b/tests/ref/seek/lavf-mxf
index c65e868350..93d419722b 100644
--- a/tests/ref/seek/lavf-mxf
+++ b/tests/ref/seek/lavf-mxf
@@ -1,48 +1,48 @@
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret:-1 st: 1 flags:0 ts: 2.576667
ret: 0 st: 1 flags:1 ts: 1.470833
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211968 size: 24799
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret:-1 st: 0 flags:0 ts: 2.160000
ret: 0 st: 0 flags:1 ts: 1.040000
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret: 0 st: 1 flags:0 ts:-0.058333
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret: 0 st: 1 flags:1 ts: 2.835833
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
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.360000 pts: 0.480000 pos: 211968 size: 24799
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret:-1 st: 1 flags:0 ts: 1.306667
ret: 0 st: 1 flags:1 ts: 0.200833
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret: 0 st: 0 flags:0 ts: 0.880000
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret: 0 st: 0 flags:1 ts:-0.240000
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
ret:-1 st: 1 flags:0 ts: 2.671667
ret: 0 st: 1 flags:1 ts: 1.565833
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24724
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24813
+ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 6144 size: 24801
diff --git a/tests/ref/seek/lavf-mxf_dv25 b/tests/ref/seek/lavf-mxf_dv25
new file mode 100644
index 0000000000..42b3bbdfce
--- /dev/null
+++ b/tests/ref/seek/lavf-mxf_dv25
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3067904 size:144000
+ret: 0 st: 0 flags:1 ts:-0.320000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st: 1 flags:0 ts: 2.576667
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0 st: 1 flags:1 ts: 1.470833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0 st:-1 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1383936 size:144000
+ret: 0 st:-1 flags:1 ts:-0.740831
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st: 0 flags:0 ts: 2.160000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0 st: 0 flags:1 ts: 1.040000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0 st: 1 flags:0 ts:-0.058333
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st: 1 flags:1 ts: 2.835833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2455552 size:144000
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0 st: 1 flags:0 ts: 1.306667
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0 st: 1 flags:1 ts: 0.200833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 771584 size:144000
+ret: 0 st:-1 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st:-1 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0 st: 0 flags:0 ts: 0.880000
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3374080 size:144000
+ret: 0 st: 0 flags:1 ts:-0.240000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
+ret: 0 st: 1 flags:0 ts: 2.671667
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0 st: 1 flags:1 ts: 1.565833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1843200 size:144000
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:144000
diff --git a/tests/ref/seek/lavf-mxf_dvcpro50 b/tests/ref/seek/lavf-mxf_dvcpro50
new file mode 100644
index 0000000000..c3d9d3afd7
--- /dev/null
+++ b/tests/ref/seek/lavf-mxf_dvcpro50
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:5945344 size:288000
+ret: 0 st: 0 flags:1 ts:-0.320000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st: 1 flags:0 ts: 2.576667
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0 st: 1 flags:1 ts: 1.470833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0 st:-1 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2678784 size:288000
+ret: 0 st:-1 flags:1 ts:-0.740831
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st: 0 flags:0 ts: 2.160000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0 st: 0 flags:1 ts: 1.040000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0 st: 1 flags:0 ts:-0.058333
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st: 1 flags:1 ts: 2.835833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4757504 size:288000
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0 st: 1 flags:0 ts: 1.306667
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0 st: 1 flags:1 ts: 0.200833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:1490944 size:288000
+ret: 0 st:-1 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st:-1 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0 st: 0 flags:0 ts: 0.880000
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6539264 size:288000
+ret: 0 st: 0 flags:1 ts:-0.240000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
+ret: 0 st: 1 flags:0 ts: 2.671667
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0 st: 1 flags:1 ts: 1.565833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3569664 size:288000
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 6144 size:288000
diff --git a/tests/ref/seek/vsynth2-dv-411 b/tests/ref/seek/lavf-mxf_opatom
index baaeefb2cf..ca17ba78f9 100644
--- a/tests/ref/seek/vsynth2-dv-411
+++ b/tests/ref/seek/lavf-mxf_opatom
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3773465 size:188416
ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1700889 size:188416
ret: 0 st: 0 flags:1 ts:-0.760000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:3019801 size:188416
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 947225 size:188416
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:4150297 size:188416
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
ret: 0 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:4527129 size:188416
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:2266137 size:188416
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5145 size:188416
diff --git a/tests/ref/seek/lavf-mxf_opatom_audio b/tests/ref/seek/lavf-mxf_opatom_audio
new file mode 100644
index 0000000000..2d1a7cc350
--- /dev/null
+++ b/tests/ref/seek/lavf-mxf_opatom_audio
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st: 0 flags:0 ts: 0.788333
+ret: 0 st: 0 flags:1 dts: 0.788333 pts: 0.788333 pos: 80313 size: 3840
+ret: 0 st: 0 flags:1 ts:-0.317500
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st: 0 flags:0 ts: 0.365000
+ret: 0 st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos: 39673 size: 3840
+ret: 0 st: 0 flags:1 ts:-0.740833
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st: 0 flags:0 ts:-0.058333
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st: 0 flags:1 ts: 2.835833
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.624167 pts: 0.624167 pos: 64553 size: 3840
+ret: 0 st: 0 flags:0 ts:-0.481667
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st: 0 flags:1 ts: 2.412500
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200833 pts: 0.200833 pos: 23913 size: 3840
+ret: 0 st: 0 flags:0 ts:-0.905000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st: 0 flags:1 ts: 1.989167
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 89433 size: 3840
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
+ret: 0 st: 0 flags:0 ts: 2.671667
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st: 0 flags:1 ts: 1.565833
+ret: 0 st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size: 2
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 48793 size: 3840
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 4633 size: 3840
diff --git a/tests/ref/seek/lavf-nut b/tests/ref/seek/lavf-nut
index 46f1ea2cc9..b2da52629b 100644
--- a/tests/ref/seek/lavf-nut
+++ b/tests/ref/seek/lavf-nut
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 395 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.010918 pts: 0.010918 pos: 623 size: 27837
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
-ret: 0 st: 1 flags:0 ts: 2.586122
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 1 flags:1 ts: 1.462857
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 0 flags:0 ts: 0.788340
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 0 flags:1 ts:-0.317500
+ret: 0 st: 0 flags:1 dts: 0.010918 pts: 0.010918 pos: 623 size: 27837
+ret: 0 st: 1 flags:0 ts: 2.576667
+ret: 0 st: 1 flags:1 dts: 0.862041 pts: 0.862041 pos: 271315 size: 209
+ret: 0 st: 1 flags:1 ts: 1.470839
+ret: 0 st: 1 flags:1 dts: 0.862041 pts: 0.862041 pos: 271315 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
-ret: 0 st: 0 flags:0 ts: 2.160000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 0 flags:1 ts: 1.040000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 1 flags:0 ts:-0.052245
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
-ret: 0 st: 1 flags:1 ts: 2.847347
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.010918 pts: 0.010918 pos: 623 size: 27837
+ret: 0 st: 0 flags:0 ts: 2.153340
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 0 flags:1 ts: 1.047500
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 1 flags:0 ts:-0.058322
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 395 size: 208
+ret: 0 st: 1 flags:1 ts: 2.835828
+ret: 0 st: 1 flags:1 dts: 0.862041 pts: 0.862041 pos: 271315 size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 1 flags:0 ts: 1.306122
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 1 flags:1 ts: 0.208980
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 0 flags:0 ts:-0.481660
+ret: 0 st: 0 flags:1 dts: 0.010918 pts: 0.010918 pos: 623 size: 27837
+ret: 0 st: 0 flags:1 ts: 2.412500
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 1 flags:0 ts: 1.306667
+ret: 0 st: 1 flags:1 dts: 0.862041 pts: 0.862041 pos: 271315 size: 209
+ret: 0 st: 1 flags:1 ts: 0.200839
+ret: 0 st: 1 flags:1 dts: 0.182857 pts: 0.182857 pos: 71957 size: 209
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.010918 pts: 0.010918 pos: 623 size: 27837
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 0 flags:0 ts: 0.880000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 0 flags:1 ts:-0.240000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
-ret: 0 st: 1 flags:0 ts: 2.664490
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
-ret: 0 st: 1 flags:1 ts: 1.567347
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 0 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
+ret: 0 st: 0 flags:1 ts:-0.222500
+ret: 0 st: 0 flags:1 dts: 0.010918 pts: 0.010918 pos: 623 size: 27837
+ret: 0 st: 1 flags:0 ts: 2.671678
+ret: 0 st: 1 flags:1 dts: 0.862041 pts: 0.862041 pos: 271315 size: 209
+ret: 0 st: 1 flags:1 ts: 1.565850
+ret: 0 st: 1 flags:1 dts: 0.862041 pts: 0.862041 pos: 271315 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146353 size: 27925
+ret: 0 st: 0 flags:1 dts: 0.490918 pts: 0.490918 pos: 146490 size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 295 size: 27837
+ret: 0 st: 0 flags:1 dts: 0.010918 pts: 0.010918 pos: 623 size: 27837
diff --git a/tests/ref/seek/lavf-ogg b/tests/ref/seek/lavf-ogg
index 109ae3226d..caf4879075 100644
--- a/tests/ref/seek/lavf-ogg
+++ b/tests/ref/seek/lavf-ogg
@@ -1,44 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:1 ts: 1.894167
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:0 ts: 0.788345
-ret:-EOF
-ret:-1 st: 0 flags:1 ts:-0.317506
-ret:-1 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st: 0 flags:1 ts:-0.317506
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:1 ts: 1.470835
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:0 ts: 0.365011
-ret:-EOF
-ret:-1 st: 0 flags:1 ts:-0.740839
-ret:-1 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st: 0 flags:1 ts:-0.740839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:1 ts: 1.047503
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:1 ts: 2.835828
-ret:-EOF
-ret:-1 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:1 ts: 0.624171
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:1 ts: 2.412494
-ret:-EOF
-ret:-1 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:1 ts: 0.200839
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 124 size: 1364
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:1 ts: 1.989184
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:0 ts: 0.883340
-ret:-EOF
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.671678
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st: 0 flags:0 ts: 2.671678
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st: 0 flags:1 ts: 1.565850
-ret:-EOF
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
ret: 0 st:-1 flags:0 ts: 0.460008
-ret:-EOF
-ret:-1 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 164 size: 1364
diff --git a/tests/ref/seek/lavf-pbmpipe b/tests/ref/seek/lavf-pbmpipe
index 2858934786..2782a9f036 100644
--- a/tests/ref/seek/lavf-pbmpipe
+++ b/tests/ref/seek/lavf-pbmpipe
@@ -1,27 +1,31 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:317075
-ret:-EINVAL st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 12683
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 12683
ret:-EINVAL st:-1 flags:1 ts: 1.894167
ret:-EINVAL st: 0 flags:0 ts: 0.800000
-ret:-EINVAL st: 0 flags:1 ts:-0.320000
+ret:-1 st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
ret:-EINVAL st: 0 flags:0 ts: 0.360000
-ret:-EINVAL st: 0 flags:1 ts:-0.760000
+ret:-1 st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
-ret:-EINVAL st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 12683
ret:-EINVAL st: 0 flags:1 ts: 2.840000
ret:-EINVAL st:-1 flags:0 ts: 1.730004
ret:-EINVAL st:-1 flags:1 ts: 0.624171
-ret:-EINVAL st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 12683
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
ret:-EINVAL st:-1 flags:1 ts: 0.200839
-ret:-EINVAL st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 12683
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
-ret:-EINVAL st:-1 flags:1 ts:-0.222493
+ret:-1 st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
ret:-EINVAL st:-1 flags:0 ts: 0.460008
-ret:-EINVAL st:-1 flags:1 ts:-0.645825
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-pcx b/tests/ref/seek/lavf-pcx
index 418674f7a2..ba21627e86 100644
--- a/tests/ref/seek/lavf-pcx
+++ b/tests/ref/seek/lavf-pcx
@@ -5,7 +5,8 @@ ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:363107
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:364760
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:362983
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-pgm b/tests/ref/seek/lavf-pgm
index 2836367b04..ceac0085bc 100644
--- a/tests/ref/seek/lavf-pgm
+++ b/tests/ref/seek/lavf-pgm
@@ -5,7 +5,8 @@ ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:101391
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:101391
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:101391
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-pgmpipe b/tests/ref/seek/lavf-pgmpipe
index 8ba51807d8..66415c4160 100644
--- a/tests/ref/seek/lavf-pgmpipe
+++ b/tests/ref/seek/lavf-pgmpipe
@@ -1,27 +1,31 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:2534775
-ret:-EINVAL st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:101391
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:101391
ret:-EINVAL st:-1 flags:1 ts: 1.894167
ret:-EINVAL st: 0 flags:0 ts: 0.800000
-ret:-EINVAL st: 0 flags:1 ts:-0.320000
+ret:-1 st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
ret:-EINVAL st: 0 flags:0 ts: 0.360000
-ret:-EINVAL st: 0 flags:1 ts:-0.760000
+ret:-1 st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
-ret:-EINVAL st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:101391
ret:-EINVAL st: 0 flags:1 ts: 2.840000
ret:-EINVAL st:-1 flags:0 ts: 1.730004
ret:-EINVAL st:-1 flags:1 ts: 0.624171
-ret:-EINVAL st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:101391
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
ret:-EINVAL st:-1 flags:1 ts: 0.200839
-ret:-EINVAL st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:101391
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
-ret:-EINVAL st:-1 flags:1 ts:-0.222493
+ret:-1 st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
ret:-EINVAL st:-1 flags:0 ts: 0.460008
-ret:-EINVAL st:-1 flags:1 ts:-0.645825
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-ppm b/tests/ref/seek/lavf-ppm
index 6376b5ec4a..6d53ce06e6 100644
--- a/tests/ref/seek/lavf-ppm
+++ b/tests/ref/seek/lavf-ppm
@@ -5,7 +5,8 @@ ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:304143
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:304143
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:304143
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-ppmpipe b/tests/ref/seek/lavf-ppmpipe
index 46c535af75..29a9425905 100644
--- a/tests/ref/seek/lavf-ppmpipe
+++ b/tests/ref/seek/lavf-ppmpipe
@@ -1,27 +1,31 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:7603575
-ret:-EINVAL st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:304143
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:304143
ret:-EINVAL st:-1 flags:1 ts: 1.894167
ret:-EINVAL st: 0 flags:0 ts: 0.800000
-ret:-EINVAL st: 0 flags:1 ts:-0.320000
+ret:-1 st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
ret:-EINVAL st: 0 flags:0 ts: 0.360000
-ret:-EINVAL st: 0 flags:1 ts:-0.760000
+ret:-1 st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
-ret:-EINVAL st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:304143
ret:-EINVAL st: 0 flags:1 ts: 2.840000
ret:-EINVAL st:-1 flags:0 ts: 1.730004
ret:-EINVAL st:-1 flags:1 ts: 0.624171
-ret:-EINVAL st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:304143
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
ret:-EINVAL st:-1 flags:1 ts: 0.200839
-ret:-EINVAL st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:304143
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
-ret:-EINVAL st:-1 flags:1 ts:-0.222493
+ret:-1 st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
ret:-EINVAL st:-1 flags:0 ts: 0.460008
-ret:-EINVAL st:-1 flags:1 ts:-0.645825
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-rm b/tests/ref/seek/lavf-rm
index adce9e0895..4b1917300e 100644
--- a/tests/ref/seek/lavf-rm
+++ b/tests/ref/seek/lavf-rm
@@ -1,53 +1,53 @@
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 387 size: 278
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 395 size: 278
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 688 size: 31082
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 696 size: 31082
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st: 0 flags:1 ts:-0.317000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 688 size: 31082
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 696 size: 31082
ret: 0 st: 1 flags:0 ts: 2.577000
-ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346128 size: 278
+ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346138 size: 278
ret: 0 st: 1 flags:1 ts: 1.471000
-ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346128 size: 278
+ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346138 size: 278
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 158515 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 158523 size: 31134
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 688 size: 31082
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 696 size: 31082
ret: 0 st: 0 flags:0 ts: 2.153000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st: 0 flags:1 ts: 1.048000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st: 1 flags:0 ts:-0.058000
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 387 size: 278
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 395 size: 278
ret: 0 st: 1 flags:1 ts: 2.836000
-ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346128 size: 278
+ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346138 size: 278
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 158515 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 158523 size: 31134
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 688 size: 31082
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 696 size: 31082
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st: 1 flags:0 ts: 1.307000
-ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346128 size: 278
+ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346138 size: 278
ret: 0 st: 1 flags:1 ts: 0.201000
-ret: 0 st: 1 flags:1 dts: 0.174000 pts: 0.174000 pos: 78969 size: 278
+ret: 0 st: 1 flags:1 dts: 0.174000 pts: 0.174000 pos: 78977 size: 278
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 688 size: 31082
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 696 size: 31082
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st: 0 flags:0 ts: 0.883000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314982 size: 31143
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 314992 size: 31143
ret: 0 st: 0 flags:1 ts:-0.222000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 688 size: 31082
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 696 size: 31082
ret: 0 st: 1 flags:0 ts: 2.672000
-ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346128 size: 278
+ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346138 size: 278
ret: 0 st: 1 flags:1 ts: 1.566000
-ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346128 size: 278
+ret: 0 st: 1 flags:1 dts: 0.975000 pts: 0.975000 pos: 346138 size: 278
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 158515 size: 31134
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 158523 size: 31134
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 688 size: 31082
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 696 size: 31082
diff --git a/tests/ref/seek/lavf-sgi b/tests/ref/seek/lavf-sgi
index 04c7b2b1a4..fac6ad9769 100644
--- a/tests/ref/seek/lavf-sgi
+++ b/tests/ref/seek/lavf-sgi
@@ -5,7 +5,8 @@ ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:307708
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:307430
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:306909
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-tga b/tests/ref/seek/lavf-tga
index 8f9075364f..ee7552a15d 100644
--- a/tests/ref/seek/lavf-tga
+++ b/tests/ref/seek/lavf-tga
@@ -5,7 +5,8 @@ ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:304172
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:304172
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:304172
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-tiff b/tests/ref/seek/lavf-tiff
index 1b49f2f2e7..0d9fb04484 100644
--- a/tests/ref/seek/lavf-tiff
+++ b/tests/ref/seek/lavf-tiff
@@ -5,7 +5,8 @@ ret:-EINVAL st: 0 flags:0 ts: 0.800000
ret:-EINVAL st: 0 flags:1 ts:-0.320000
ret:-EINVAL st:-1 flags:0 ts: 2.576668
ret:-EINVAL st:-1 flags:1 ts: 1.470835
-ret:-EINVAL st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:307150
ret:-EINVAL st: 0 flags:1 ts:-0.760000
ret:-EINVAL st:-1 flags:0 ts: 2.153336
ret:-EINVAL st:-1 flags:1 ts: 1.047503
@@ -16,12 +17,14 @@ ret:-EINVAL st:-1 flags:1 ts: 0.624171
ret:-EINVAL st: 0 flags:0 ts:-0.480000
ret:-EINVAL st: 0 flags:1 ts: 2.400000
ret:-EINVAL st:-1 flags:0 ts: 1.306672
-ret:-EINVAL st:-1 flags:1 ts: 0.200839
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:307140
ret:-EINVAL st: 0 flags:0 ts:-0.920000
ret:-EINVAL st: 0 flags:1 ts: 2.000000
ret:-EINVAL st:-1 flags:0 ts: 0.883340
ret:-EINVAL st:-1 flags:1 ts:-0.222493
ret:-EINVAL st: 0 flags:0 ts: 2.680000
ret:-EINVAL st: 0 flags:1 ts: 1.560000
-ret:-EINVAL st:-1 flags:0 ts: 0.460008
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:307140
ret:-EINVAL st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-ts b/tests/ref/seek/lavf-ts
index b31fab052c..e57651ef9c 100644
--- a/tests/ref/seek/lavf-ts
+++ b/tests/ref/seek/lavf-ts
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24813
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:0 dts: 1.480000 pts: 1.520000 pos: 44932 size: 14502
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.920000 pos: 189692 size: 24786
ret: 0 st: 0 flags:0 ts: 0.788333
-ret: 0 st: 0 flags:0 dts: 1.560000 pts: 1.600000 pos: 74260 size: 13388
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 0 flags:1 ts:-0.317500
-ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24813
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 1 flags:0 ts: 2.576667
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 404576 size: 209
ret: 0 st: 1 flags:1 ts: 1.470833
-ret: 0 st: 0 flags:0 dts: 2.120000 pts: 2.160000 pos: 294032 size: 13839
+ret: 0 st: 1 flags:1 dts: 1.429089 pts: 1.429089 pos: 159988 size: 208
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 0 flags:0 dts: 1.480000 pts: 1.520000 pos: 44932 size: 14502
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24813
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 0 flags:0 ts: 2.153333
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 1.794811 pts: 1.794811 pos: 322608 size: 209
ret: 0 st: 0 flags:1 ts: 1.047500
-ret: 0 st: 0 flags:0 dts: 1.720000 pts: 1.760000 pos: 130096 size: 14133
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 1 flags:0 ts:-0.058333
-ret: 0 st: 0 flags:0 dts: 1.480000 pts: 1.520000 pos: 44932 size: 14502
+ret: 0 st: 1 flags:1 dts: 1.429089 pts: 1.429089 pos: 159988 size: 208
ret: 0 st: 1 flags:1 ts: 2.835833
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 404576 size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 1.429089 pts: 1.429089 pos: 159988 size: 208
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24813
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 0 flags:0 ts:-0.481667
-ret: 0 st: 0 flags:0 dts: 1.480000 pts: 1.520000 pos: 44932 size: 14502
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 0 flags:1 ts: 2.412500
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 404576 size: 209
ret: 0 st: 1 flags:0 ts: 1.306667
-ret: 0 st: 0 flags:0 dts: 2.040000 pts: 2.080000 pos: 265644 size: 12390
+ret: 0 st: 1 flags:1 dts: 1.429089 pts: 1.429089 pos: 159988 size: 208
ret: 0 st: 1 flags:1 ts: 0.200844
-ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24813
+ret: 0 st: 1 flags:1 dts: 1.429089 pts: 1.429089 pos: 159988 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:0 dts: 1.480000 pts: 1.520000 pos: 44932 size: 14502
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 0 flags:0 dts: 1.960000 pts: 2.000000 pos: 235000 size: 15019
ret: 0 st: 0 flags:0 ts: 0.883344
-ret: 0 st: 0 flags:0 dts: 1.640000 pts: 1.680000 pos: 102836 size: 12781
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 0 flags:1 ts:-0.222489
-ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24813
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st: 1 flags:0 ts: 2.671678
-ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.160522 pts: 2.160522 pos: 404576 size: 209
ret: 0 st: 1 flags:1 ts: 1.565844
-ret: 0 st: 0 flags:0 dts: 2.200000 pts: 2.240000 pos: 325240 size: 12679
+ret: 0 st: 1 flags:1 dts: 1.429089 pts: 1.429089 pos: 159988 size: 208
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:0 dts: 1.480000 pts: 1.520000 pos: 44932 size: 14502
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24813
+ret: 0 st: 0 flags:1 dts: 1.400000 pts: 1.440000 pos: 564 size: 24801
diff --git a/tests/ref/seek/lavf-voc b/tests/ref/seek/lavf-voc
index 387aef6cb8..014c251129 100644
--- a/tests/ref/seek/lavf-voc
+++ b/tests/ref/seek/lavf-voc
@@ -1,27 +1,44 @@
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 1024
-ret:-1 st:-1 flags:0 ts:-1.000000
-ret:-1 st:-1 flags:1 ts: 1.894167
-ret:-1 st: 0 flags:0 ts: 0.788335
-ret:-1 st: 0 flags:1 ts:-0.317508
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 1024
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret:-EOF
+ret: 0 st: 0 flags:0 ts: 0.788330
+ret: 0 st: 0 flags:1 dts: 0.800773 pts: 0.800773 pos: 34984 size: 1024
+ret:-1 st: 0 flags:1 ts:-0.317494
ret:-1 st:-1 flags:0 ts: 2.576668
-ret:-1 st:-1 flags:1 ts: 1.470835
-ret:-1 st: 0 flags:0 ts: 0.365006
-ret:-1 st: 0 flags:1 ts:-0.740837
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret:-EOF
+ret: 0 st: 0 flags:0 ts: 0.365012
+ret: 0 st: 0 flags:1 dts: 0.376834 pts: 0.376834 pos: 16480 size: 1024
+ret:-1 st: 0 flags:1 ts:-0.740834
ret:-1 st:-1 flags:0 ts: 2.153336
-ret:-1 st:-1 flags:1 ts: 1.047503
-ret:-1 st: 0 flags:0 ts:-0.058323
-ret:-1 st: 0 flags:1 ts: 2.835834
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret:-EOF
+ret: 0 st: 0 flags:0 ts:-0.058328
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 1024
+ret: 0 st: 0 flags:1 ts: 2.835848
+ret:-EOF
ret:-1 st:-1 flags:0 ts: 1.730004
-ret:-1 st:-1 flags:1 ts: 0.624171
-ret:-1 st: 0 flags:0 ts:-0.481652
-ret:-1 st: 0 flags:1 ts: 2.412505
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.612356 pts: 0.612356 pos: 26760 size: 1024
+ret: 0 st: 0 flags:0 ts:-0.481669
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 1024
+ret: 0 st: 0 flags:1 ts: 2.412507
+ret:-EOF
ret:-1 st:-1 flags:0 ts: 1.306672
-ret:-1 st:-1 flags:1 ts: 0.200839
-ret:-1 st: 0 flags:0 ts:-0.905003
-ret:-1 st: 0 flags:1 ts: 1.989176
-ret:-1 st:-1 flags:0 ts: 0.883340
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.188417 pts: 0.188417 pos: 8256 size: 1024
+ret: 0 st: 0 flags:0 ts:-0.904986
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 32 size: 1024
+ret: 0 st: 0 flags:1 ts: 1.989167
+ret:-EOF
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.894981 pts: 0.894981 pos: 39096 size: 1024
ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.671668
-ret:-1 st: 0 flags:1 ts: 1.565847
-ret:-1 st:-1 flags:0 ts: 0.460008
+ret:-1 st: 0 flags:0 ts: 2.671673
+ret: 0 st: 0 flags:1 ts: 1.565849
+ret:-EOF
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.471043 pts: 0.471043 pos: 20592 size: 1024
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/lavf-wav b/tests/ref/seek/lavf-wav
index 1a9cfc54c7..ed2f8d62de 100644
--- a/tests/ref/seek/lavf-wav
+++ b/tests/ref/seek/lavf-wav
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:1 ts: 1.894167
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69578 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69606 size: 4096
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:0 ts: 2.576668
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.470835
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32240 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32268 size: 4096
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:0 ts: 2.153336
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.047503
ret:-EOF
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:1 ts: 2.835828
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.730004
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55098 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55126 size: 4096
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:1 ts: 2.412494
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.306672
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17760 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17788 size: 4096
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:1 ts: 1.989184
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77956 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77984 size: 4096
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:0 ts: 2.671678
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.565850
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40618 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40646 size: 4096
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
diff --git a/tests/ref/seek/lavf-wtv b/tests/ref/seek/lavf-wtv
new file mode 100644
index 0000000000..355ab98d85
--- /dev/null
+++ b/tests/ref/seek/lavf-wtv
@@ -0,0 +1,48 @@
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret: 0 st: 0 flags:1 ts:-0.317499
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret:-1 st: 1 flags:0 ts: 2.576668
+ret: 0 st: 1 flags:1 ts: 1.470835
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret: 0 st:-1 flags:0 ts: 0.365002
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st:-1 flags:1 ts:-0.740831
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret:-1 st: 0 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 ts: 1.047503
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st: 1 flags:0 ts:-0.058330
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st: 1 flags:1 ts: 2.835837
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret:-1 st:-1 flags:0 ts: 1.730004
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret:-1 st: 1 flags:0 ts: 1.306672
+ret: 0 st: 1 flags:1 ts: 0.200839
+ret: 0 st: 1 flags:1 dts: 0.211950 pts: 0.211950 pos: 99280 size: 209
+ret: 0 st:-1 flags:0 ts:-0.904994
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st:-1 flags:1 ts: 1.989173
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret: 0 st: 0 flags:0 ts: 0.883340
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret: 0 st: 0 flags:1 ts:-0.222493
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret:-1 st: 1 flags:0 ts: 2.671674
+ret: 0 st: 1 flags:1 ts: 1.565841
+ret: 0 st: 1 flags:1 dts: 0.734399 pts: 0.734399 pos: 294672 size: 209
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 1 flags:1 dts: 0.029093 pts: 0.029093 pos: 26272 size: 208
diff --git a/tests/ref/seek/lavf-yuv4mpeg b/tests/ref/seek/lavf-yuv4mpeg
index 81c1de9aa3..6be9ba9480 100644
--- a/tests/ref/seek/lavf-yuv4mpeg
+++ b/tests/ref/seek/lavf-yuv4mpeg
@@ -1,27 +1,45 @@
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 64 size:152064
ret:-1 st:-1 flags:0 ts:-1.000000
-ret:-1 st:-1 flags:1 ts: 1.894167
-ret:-1 st: 0 flags:0 ts: 0.800000
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret:-EOF
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3041464 size:152064
ret:-1 st: 0 flags:1 ts:-0.320000
-ret:-1 st:-1 flags:0 ts: 2.576668
-ret:-1 st:-1 flags:1 ts: 1.470835
-ret:-1 st: 0 flags:0 ts: 0.360000
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret:-EOF
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret:-EOF
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1368694 size:152064
ret:-1 st: 0 flags:1 ts:-0.760000
-ret:-1 st:-1 flags:0 ts: 2.153336
-ret:-1 st:-1 flags:1 ts: 1.047503
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret:-EOF
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret:-EOF
ret:-1 st: 0 flags:0 ts:-0.040000
-ret:-1 st: 0 flags:1 ts: 2.840000
-ret:-1 st:-1 flags:0 ts: 1.730004
-ret:-1 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret:-EOF
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret:-EOF
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2433184 size:152064
ret:-1 st: 0 flags:0 ts:-0.480000
-ret:-1 st: 0 flags:1 ts: 2.400000
-ret:-1 st:-1 flags:0 ts: 1.306672
-ret:-1 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret:-EOF
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret:-EOF
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 760414 size:152064
ret:-1 st: 0 flags:0 ts:-0.920000
-ret:-1 st: 0 flags:1 ts: 2.000000
-ret:-1 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret:-EOF
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3345604 size:152064
ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret:-1 st: 0 flags:1 ts: 1.560000
-ret:-1 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:0 ts: 2.680000
+ret:-EOF
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret:-EOF
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1824904 size:152064
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/mkv-codec-delay b/tests/ref/seek/mkv-codec-delay
new file mode 100644
index 0000000000..04561eb876
--- /dev/null
+++ b/tests/ref/seek/mkv-codec-delay
@@ -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: 268
+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: 268
+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: 268
+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: 268
+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: 268
+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: 268
+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: 268
+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
diff --git a/tests/ref/seek/vsynth2-jpegls b/tests/ref/seek/vsynth2-jpegls
deleted file mode 100644
index 1b27a3654a..0000000000
--- a/tests/ref/seek/vsynth2-jpegls
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7767024 size:181048
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3057326 size:163405
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.480000 pts: 1.480000 pos:5971676 size:177984
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1334822 size:150568
-ret:-1 st: 0 flags:1 ts:-0.760000
-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.040000 pts: 1.040000 pos:4056260 size:170347
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8129364 size:181472
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:7045426 size:180307
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2414840 size:159022
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8129364 size:181472
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5265990 size:175400
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 742066 size:147109
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:154766
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8129364 size:181472
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3385508 size:165810
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:6328220 size:178473
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1789916 size:154383
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-ljpeg b/tests/ref/seek/vsynth2-ljpeg
deleted file mode 100644
index 47f64c6dda..0000000000
--- a/tests/ref/seek/vsynth2-ljpeg
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:4406068 size:102731
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:1761620 size: 92236
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.480000 pts: 1.480000 pos:3394414 size: 99800
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 778564 size: 87118
-ret:-1 st: 0 flags:1 ts:-0.760000
-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.040000 pts: 1.040000 pos:2323284 size: 95279
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4611786 size:103108
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:3997920 size:101607
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1397770 size: 90251
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4611786 size:103108
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:2999316 size: 98183
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 433426 size: 85897
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 86580
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4611786 size:103108
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:1946636 size: 93348
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:3594390 size:100410
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1041206 size: 88501
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mjpeg b/tests/ref/seek/vsynth2-mjpeg
deleted file mode 100644
index 6072ddfb97..0000000000
--- a/tests/ref/seek/vsynth2-mjpeg
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 771990 size: 19172
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 294112 size: 15816
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.480000 pts: 1.480000 pos: 584836 size: 18250
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 130062 size: 14140
-ret:-1 st: 0 flags:1 ts:-0.760000
-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.040000 pts: 1.040000 pos: 391598 size: 16843
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 810344 size: 19135
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 696224 size: 18821
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 232462 size: 15159
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 810344 size: 19135
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 512664 size: 17924
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 74366 size: 13812
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14531
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 810344 size: 19135
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 325950 size: 16219
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 621546 size: 18498
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 173092 size: 14609
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg1 b/tests/ref/seek/vsynth2-mpeg1
deleted file mode 100644
index 52eef058ae..0000000000
--- a/tests/ref/seek/vsynth2-mpeg1
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 11963
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 168537 size: 15165
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 103348 size: 13767
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.440000 pts: NOPTS pos: 168537 size: 15165
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 48976 size: 12270
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.960000 pts: NOPTS pos: 103348 size: 13767
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 48976 size: 12270
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 168537 size: 15165
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11963
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 240894 size: 16003
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 103348 size: 13767
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 168537 size: 15165
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 48976 size: 12270
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg1b b/tests/ref/seek/vsynth2-mpeg1b
deleted file mode 100644
index 6e3af809f3..0000000000
--- a/tests/ref/seek/vsynth2-mpeg1b
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 14617
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 101700 size: 16809
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.320000 pts: NOPTS pos: 172617 size: 18608
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 43550 size: 14859
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.840000 pts: NOPTS pos: 101700 size: 16809
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 43550 size: 14859
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 172617 size: 18608
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 14617
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 255467 size: 19667
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 172617 size: 18608
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 172617 size: 18608
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 101700 size: 16809
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg2-422 b/tests/ref/seek/vsynth2-mpeg2-422
deleted file mode 100644
index d2a79baa06..0000000000
--- a/tests/ref/seek/vsynth2-mpeg2-422
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19047
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19047
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349153 size: 20638
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 231235 size: 21776
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.360000 pts: NOPTS pos: 291308 size: 22619
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 128388 size: 34098
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.880000 pts: NOPTS pos: 231235 size: 21776
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19047
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349153 size: 20638
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349153 size: 20638
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 128388 size: 34098
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19047
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349153 size: 20638
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 291308 size: 22619
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19047
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 19047
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 349153 size: 20638
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 231235 size: 21776
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 291308 size: 22619
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 231235 size: 21776
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg2-idct-int b/tests/ref/seek/vsynth2-mpeg2-idct-int
deleted file mode 100644
index 0b369e2498..0000000000
--- a/tests/ref/seek/vsynth2-mpeg2-idct-int
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12092
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12092
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 172048 size: 15287
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 105687 size: 13892
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.440000 pts: NOPTS pos: 172048 size: 15287
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 50238 size: 12392
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.960000 pts: NOPTS pos: 105687 size: 13892
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12092
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245946 size: 16133
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245946 size: 16133
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 50238 size: 12392
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12092
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245946 size: 16133
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 172048 size: 15287
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12092
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12092
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 245946 size: 16133
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 105687 size: 13892
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 172048 size: 15287
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 50238 size: 12392
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd b/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd
deleted file mode 100644
index 9b6174f2db..0000000000
--- a/tests/ref/seek/vsynth2-mpeg2-ivlc-qprd
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17896
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17896
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253840 size: 12176
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 192257 size: 13312
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.360000 pts: NOPTS pos: 223884 size: 13628
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 119729 size: 33112
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.880000 pts: NOPTS pos: 192257 size: 13312
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17896
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253840 size: 12176
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253840 size: 12176
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 119729 size: 33112
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17896
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253840 size: 12176
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 223884 size: 13628
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17896
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17896
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 253840 size: 12176
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 192257 size: 13312
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 223884 size: 13628
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 192257 size: 13312
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4 b/tests/ref/seek/vsynth2-mpeg4
deleted file mode 100644
index 36ba46c06c..0000000000
--- a/tests/ref/seek/vsynth2-mpeg4
+++ /dev/null
@@ -1,50 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98347 size: 14396
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 60954 size: 12631
-ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-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.440000 pts: 1.440000 pos: 98347 size: 14396
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29166 size: 10862
-ret: 0 st: 0 flags:1 ts:-0.760000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-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: 0.960000 pts: 0.960000 pos: 60954 size: 12631
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29166 size: 10862
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98347 size: 14396
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 141019 size: 15358
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 60954 size: 12631
-ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98347 size: 14396
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29166 size: 10862
-ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 10965
diff --git a/tests/ref/seek/vsynth2-mpeg4-adap b/tests/ref/seek/vsynth2-mpeg4-adap
deleted file mode 100644
index 152d020ff3..0000000000
--- a/tests/ref/seek/vsynth2-mpeg4-adap
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 114966 size: 16429
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.360000 pts: NOPTS pos: 151228 size: 18225
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 73890 size: 20238
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.880000 pts: NOPTS pos: 114966 size: 16429
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 73890 size: 20238
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 151228 size: 18225
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 6951
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 189122 size: 18125
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 114966 size: 16429
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 151228 size: 18225
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 114966 size: 16429
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4-error b/tests/ref/seek/vsynth2-mpeg4-error
deleted file mode 100644
index 45550476b1..0000000000
--- a/tests/ref/seek/vsynth2-mpeg4-error
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 158910 size: 19939
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 100670 size: 17313
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.440000 pts: 1.440000 pos: 158910 size: 19939
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 50630 size: 14739
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.960000 pts: 0.960000 pos: 100670 size: 17313
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 50630 size: 14739
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 158910 size: 19939
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 14897
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 226622 size: 19001
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 100670 size: 17313
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 158910 size: 19939
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 50630 size: 14739
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4-rc b/tests/ref/seek/vsynth2-mpeg4-rc
deleted file mode 100644
index 21aca4c8ae..0000000000
--- a/tests/ref/seek/vsynth2-mpeg4-rc
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 185808 size: 12662
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.360000 pts: NOPTS pos: 210456 size: 14427
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 114894 size: 39545
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.880000 pts: NOPTS pos: 185808 size: 12662
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 114894 size: 39545
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 210456 size: 14427
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 20139
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 236670 size: 14086
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 185808 size: 12662
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 210456 size: 14427
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 185808 size: 12662
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4-thread b/tests/ref/seek/vsynth2-mpeg4-thread
deleted file mode 100644
index 2b0f0d310c..0000000000
--- a/tests/ref/seek/vsynth2-mpeg4-thread
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 186128 size: 14685
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.360000 pts: NOPTS pos: 215778 size: 16807
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 117134 size: 37486
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.880000 pts: NOPTS pos: 186128 size: 14685
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 117134 size: 37486
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 215778 size: 16807
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 18099
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 247612 size: 15696
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 186128 size: 14685
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 215778 size: 16807
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 186128 size: 14685
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-svq1 b/tests/ref/seek/vsynth2-svq1
deleted file mode 100644
index 5b90ec8049..0000000000
--- a/tests/ref/seek/vsynth2-svq1
+++ /dev/null
@@ -1,50 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 630104 size: 31344
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 392428 size: 28568
-ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-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.440000 pts: 1.440000 pos: 630104 size: 31344
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 185116 size: 25544
-ret: 0 st: 0 flags:1 ts:-0.760000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-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: 0.960000 pts: 0.960000 pos: 392428 size: 28568
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 185116 size: 25544
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 630104 size: 31344
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 886184 size: 32128
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 392428 size: 28568
-ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 630104 size: 31344
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 185116 size: 25544
-ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 25188
diff --git a/tests/ref/seek/vsynth2-wmv1 b/tests/ref/seek/vsynth2-wmv1
deleted file mode 100644
index 47b79b80ee..0000000000
--- a/tests/ref/seek/vsynth2-wmv1
+++ /dev/null
@@ -1,46 +0,0 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126
-ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126
-ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108444 size: 14988
-ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69132 size: 13137
-ret:-1 st: 0 flags:1 ts:-0.320000
-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.440000 pts: 1.440000 pos: 108444 size: 14988
-ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35874 size: 11167
-ret:-1 st: 0 flags:1 ts:-0.760000
-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: 0.960000 pts: 0.960000 pos: 69132 size: 13137
-ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126
-ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956
-ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956
-ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35874 size: 11167
-ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126
-ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956
-ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108444 size: 14988
-ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126
-ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11126
-ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153546 size: 15956
-ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69132 size: 13137
-ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108444 size: 14988
-ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35874 size: 11167
-ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-asv1 b/tests/ref/seek/vsynth_lena-asv1
index b3cca3b0c7..0957d84000 100644
--- a/tests/ref/seek/vsynth2-asv1
+++ b/tests/ref/seek/vsynth_lena-asv1
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12152
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12152
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 939696 size: 22704
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 643348 size: 15064
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 364636 size: 19476
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 255236 size: 13312
ret:-1 st: 0 flags:1 ts:-0.320000
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.480000 pts: 1.480000 pos: 717284 size: 21768
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 493588 size: 14796
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 160544 size: 17672
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 114856 size: 12356
ret:-1 st: 0 flags:1 ts:-0.760000
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.040000 pts: 1.040000 pos: 484496 size: 20396
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 336184 size: 13824
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12152
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 985140 size: 22640
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 673508 size: 15104
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 849824 size: 22364
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 583316 size: 14956
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 288188 size: 18920
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 202876 size: 12944
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12152
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 985140 size: 22640
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 673508 size: 15104
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 631032 size: 21416
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 435132 size: 14488
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 90952 size: 17244
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 65868 size: 12144
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 17484
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12152
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 985140 size: 22640
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 673508 size: 15104
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 403836 size: 20024
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 281888 size: 13412
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 761056 size: 22012
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 523328 size: 14972
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 214224 size: 18228
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 152060 size: 12540
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-asv2 b/tests/ref/seek/vsynth_lena-asv2
index 906c2358e4..1a3c93f5d3 100644
--- a/tests/ref/seek/vsynth2-asv2
+++ b/tests/ref/seek/vsynth_lena-asv2
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12072
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12072
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 891064 size: 21664
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 630032 size: 14892
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 343044 size: 18440
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 248840 size: 13024
ret:-1 st: 0 flags:1 ts:-0.320000
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.480000 pts: 1.480000 pos: 678500 size: 20848
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 482704 size: 14532
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 151024 size: 16584
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 111604 size: 12016
ret:-1 st: 0 flags:1 ts:-0.760000
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.040000 pts: 1.040000 pos: 456544 size: 19448
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 328256 size: 13532
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12072
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 934400 size: 21624
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 659852 size: 14928
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 805248 size: 21364
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 570788 size: 14712
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 271044 size: 17784
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 197540 size: 12724
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12072
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 934400 size: 21624
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 659852 size: 14928
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 596008 size: 20456
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 425320 size: 14116
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 85924 size: 16152
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 64108 size: 11780
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 16584
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5660 size: 12072
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 934400 size: 21624
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 659852 size: 14928
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 380220 size: 18948
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 274968 size: 13176
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 720420 size: 21060
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 511948 size: 14668
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 201408 size: 17128
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 147824 size: 12240
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-dnxhd-1080i b/tests/ref/seek/vsynth_lena-dnxhd-1080i
index 6c41d67986..a5f0ce916c 100644
--- a/tests/ref/seek/vsynth2-dnxhd-1080i
+++ b/tests/ref/seek/vsynth_lena-dnxhd-1080i
@@ -3,41 +3,41 @@ ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size:606208
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:2424868 size:606208
-ret:-1 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 ts:-0.320000
+ret:-1 st: 0 flags:0 ts: 0.788359
+ret: 0 st: 0 flags:1 ts:-0.317500
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size:606208
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: 0.160000 pts: 0.160000 pos:2424868 size:606208
-ret:-1 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 ts:-0.760000
+ret:-1 st: 0 flags:0 ts: 0.365000
+ret: 0 st: 0 flags:1 ts:-0.740859
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size:606208
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: 0.160000 pts: 0.160000 pos:2424868 size:606208
-ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:0 ts:-0.058359
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size:606208
-ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 ts: 2.835859
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:2424868 size:606208
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.160000 pts: 0.160000 pos:2424868 size:606208
-ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:0 ts:-0.481641
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size:606208
-ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 ts: 2.412500
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:2424868 size:606208
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.160000 pts: 0.160000 pos:2424868 size:606208
-ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:0 ts:-0.905000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size:606208
-ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 ts: 1.989141
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:2424868 size:606208
ret:-1 st:-1 flags:0 ts: 0.883340
ret: 0 st:-1 flags:1 ts:-0.222493
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size:606208
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
+ret:-1 st: 0 flags:0 ts: 2.671641
+ret: 0 st: 0 flags:1 ts: 1.565859
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:2424868 size:606208
ret:-1 st:-1 flags:0 ts: 0.460008
ret: 0 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb b/tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb
new file mode 100644
index 0000000000..115b977912
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-dnxhd-4k-hr-lb
@@ -0,0 +1,40 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:798720
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:798720
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:3194880 size:798720
+ret:-1 st: 0 flags:0 ts: 0.788334
+ret:-1 st: 0 flags:1 ts:-0.317499
+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: 0.160000 pts: 0.160000 pos:3194880 size:798720
+ret:-1 st: 0 flags:0 ts: 0.365002
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.160000 pts: 0.160000 pos:3194880 size:798720
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:798720
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:3194880 size:798720
+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.160000 pts: 0.160000 pos:3194880 size:798720
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:798720
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:3194880 size:798720
+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.160000 pts: 0.160000 pos:3194880 size:798720
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:798720
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:3194880 size:798720
+ret:-1 st:-1 flags:0 ts: 0.883340
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:3194880 size:798720
+ret:-1 st:-1 flags:0 ts: 0.460008
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-dnxhd-720p-rd b/tests/ref/seek/vsynth_lena-dnxhd-720p
index b6398b60d7..b57f07dd71 100644
--- a/tests/ref/seek/vsynth2-dnxhd-720p-rd
+++ b/tests/ref/seek/vsynth_lena-dnxhd-720p
@@ -3,38 +3,38 @@ ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
-ret:-1 st: 0 flags:0 ts: 0.800000
-ret:-1 st: 0 flags:1 ts:-0.320000
+ret:-1 st: 0 flags:0 ts: 0.788334
+ret:-1 st: 0 flags:1 ts:-0.317499
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: 0.160000 pts: 0.160000 pos:1835008 size:458752
-ret:-1 st: 0 flags:0 ts: 0.360000
-ret:-1 st: 0 flags:1 ts:-0.760000
+ret:-1 st: 0 flags:0 ts: 0.365002
+ret:-1 st: 0 flags:1 ts:-0.740831
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: 0.160000 pts: 0.160000 pos:1835008 size:458752
-ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:0 ts:-0.058330
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
-ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 ts: 2.835837
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
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.160000 pts: 0.160000 pos:1835008 size:458752
-ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:0 ts:-0.481662
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
-ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 ts: 2.412505
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
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.160000 pts: 0.160000 pos:1835008 size:458752
-ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:0 ts:-0.904994
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
-ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 ts: 1.989173
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
ret:-1 st:-1 flags:0 ts: 0.883340
ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
ret:-1 st:-1 flags:0 ts: 0.460008
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-dnxhd-720p b/tests/ref/seek/vsynth_lena-dnxhd-720p-rd
index b6398b60d7..b57f07dd71 100644
--- a/tests/ref/seek/vsynth2-dnxhd-720p
+++ b/tests/ref/seek/vsynth_lena-dnxhd-720p-rd
@@ -3,38 +3,38 @@ ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
-ret:-1 st: 0 flags:0 ts: 0.800000
-ret:-1 st: 0 flags:1 ts:-0.320000
+ret:-1 st: 0 flags:0 ts: 0.788334
+ret:-1 st: 0 flags:1 ts:-0.317499
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: 0.160000 pts: 0.160000 pos:1835008 size:458752
-ret:-1 st: 0 flags:0 ts: 0.360000
-ret:-1 st: 0 flags:1 ts:-0.760000
+ret:-1 st: 0 flags:0 ts: 0.365002
+ret:-1 st: 0 flags:1 ts:-0.740831
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: 0.160000 pts: 0.160000 pos:1835008 size:458752
-ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:0 ts:-0.058330
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
-ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 ts: 2.835837
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
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.160000 pts: 0.160000 pos:1835008 size:458752
-ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:0 ts:-0.481662
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
-ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 ts: 2.412505
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
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.160000 pts: 0.160000 pos:1835008 size:458752
-ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:0 ts:-0.904994
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:458752
-ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 ts: 1.989173
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
ret:-1 st:-1 flags:0 ts: 0.883340
ret:-1 st:-1 flags:1 ts:-0.222493
-ret:-1 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 ts: 1.560000
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
ret: 0 st: 0 flags:1 dts: 0.160000 pts: 0.160000 pos:1835008 size:458752
ret:-1 st:-1 flags:0 ts: 0.460008
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-dv-50 b/tests/ref/seek/vsynth_lena-dv
index 1f07e5b71f..d318794157 100644
--- a/tests/ref/seek/vsynth2-dv-50
+++ b/tests/ref/seek/vsynth_lena-dv
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:6768000 size:144000
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2880000 size:144000
ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:5328000 size:144000
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1296000 size:144000
ret: 0 st: 0 flags:1 ts:-0.760000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3744000 size:144000
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:6192000 size:144000
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2304000 size:144000
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4752000 size:144000
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 720000 size:144000
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3168000 size:144000
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:5616000 size:144000
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1728000 size:144000
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:288000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
diff --git a/tests/ref/seek/vsynth2-dv b/tests/ref/seek/vsynth_lena-dv-411
index baaeefb2cf..d318794157 100644
--- a/tests/ref/seek/vsynth2-dv
+++ b/tests/ref/seek/vsynth_lena-dv-411
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:6768000 size:144000
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2880000 size:144000
ret: 0 st: 0 flags:1 ts:-0.320000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:5328000 size:144000
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1296000 size:144000
ret: 0 st: 0 flags:1 ts:-0.760000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3744000 size:144000
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:6192000 size:144000
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2304000 size:144000
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4752000 size:144000
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 720000 size:144000
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3168000 size:144000
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
ret: 0 st: 0 flags:0 ts: 2.680000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7056000 size:144000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:5616000 size:144000
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1728000 size:144000
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: -1 size:144000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:144000
diff --git a/tests/ref/seek/vsynth_lena-dv-50 b/tests/ref/seek/vsynth_lena-dv-50
new file mode 100644
index 0000000000..fae6d1b225
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-dv-50
@@ -0,0 +1,53 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:13536000 size:288000
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:5760000 size:288000
+ret: 0 st: 0 flags:1 ts:-0.320000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st:-1 flags:0 ts: 2.576668
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14112000 size:288000
+ret: 0 st:-1 flags:1 ts: 1.470835
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:10656000 size:288000
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2592000 size:288000
+ret: 0 st: 0 flags:1 ts:-0.760000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st:-1 flags:0 ts: 2.153336
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14112000 size:288000
+ret: 0 st:-1 flags:1 ts: 1.047503
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:7488000 size:288000
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14112000 size:288000
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:12384000 size:288000
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4608000 size:288000
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14112000 size:288000
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:9504000 size:288000
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1440000 size:288000
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14112000 size:288000
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6336000 size:288000
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
+ret: 0 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14112000 size:288000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:11232000 size:288000
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3456000 size:288000
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size:288000
diff --git a/tests/ref/seek/vsynth2-ffv1 b/tests/ref/seek/vsynth_lena-ffv1
index c0a89509ce..57583686d4 100644
--- a/tests/ref/seek/vsynth2-ffv1
+++ b/tests/ref/seek/vsynth_lena-ffv1
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5690 size: 71796
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5690 size: 71796
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2590398 size: 81816
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1666848 size: 77232
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631574 size: 72710
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos:2590398 size: 81816
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 808720 size: 70724
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801638 size: 69485
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos:1666848 size: 77232
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631574 size: 72710
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5690 size: 71796
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3552258 size: 83766
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3552258 size: 83766
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 808720 size: 70724
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801638 size: 69485
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5690 size: 71796
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3552258 size: 83766
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2590398 size: 81816
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5690 size: 71796
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5690 size: 71796
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5694 size: 71707
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3552258 size: 83766
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3393894 size: 77489
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1666848 size: 77232
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1631574 size: 72710
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2590398 size: 81816
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2499442 size: 75965
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 808720 size: 70724
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 801638 size: 69485
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-flashsv b/tests/ref/seek/vsynth_lena-flashsv
index 82acde81d6..25176ba817 100644
--- a/tests/ref/seek/vsynth2-flashsv
+++ b/tests/ref/seek/vsynth_lena-flashsv
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size:219405
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size:240757
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size:219405
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size:240757
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:10902646 size:244577
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:11605750 size:254053
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:4458610 size:230521
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:4820505 size:245503
ret:-1 st: 0 flags:1 ts:-0.317000
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.440000 pts: 1.440000 pos:8234830 size:240794
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:8811899 size:253041
ret: 0 st: 0 flags:0 ts: 0.365000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: 0.400000 pos:2201083 size:221959
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: 0.400000 pos:2387440 size:241101
ret:-1 st: 0 flags:1 ts:-0.741000
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.040000 pts: 1.040000 pos:5853907 size:235507
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:6302822 size:248927
ret: 0 st: 0 flags:0 ts:-0.058000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size:219405
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size:240757
ret: 0 st: 0 flags:1 ts: 2.836000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:11391906 size:244616
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:12114700 size:254237
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.760000 pts: 1.760000 pos:10170977 size:243403
+ret: 0 st: 0 flags:1 dts: 1.760000 pts: 1.760000 pos:10843564 size:253913
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.600000 pts: 0.600000 pos:3319311 size:226082
+ret: 0 st: 0 flags:1 dts: 0.600000 pts: 0.600000 pos:3598793 size:243372
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size:219405
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size:240757
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:11391906 size:244616
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:12114700 size:254237
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:7515896 size:239079
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:8053704 size:252195
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1098674 size:220236
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1187809 size:238567
ret: 0 st: 0 flags:0 ts:-0.905000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size:219405
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size:240757
ret: 0 st: 0 flags:1 ts: 1.989000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:11391906 size:244616
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:12114700 size:254237
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.920000 pts: 0.920000 pos:5152576 size:233102
+ret: 0 st: 0 flags:1 dts: 0.920000 pts: 0.920000 pos:5559226 size:247341
ret:-1 st:-1 flags:1 ts:-0.222493
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.560000 pts: 1.560000 pos:8958199 size:241837
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:9572235 size:254219
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:2645880 size:223865
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:2870241 size:242377
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-flv b/tests/ref/seek/vsynth_lena-flv
index ba2efdd1c9..ae9eedfa18 100644
--- a/tests/ref/seek/vsynth2-flv
+++ b/tests/ref/seek/vsynth_lena-flv
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 12771
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size: 10380
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 12771
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size: 10380
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108745 size: 16158
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83228 size: 12295
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 67792 size: 14392
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 52573 size: 11127
ret:-1 st: 0 flags:1 ts:-0.317000
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.440000 pts: 1.440000 pos: 108745 size: 16158
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83228 size: 12295
ret: 0 st: 0 flags:0 ts: 0.365000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 32529 size: 12708
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 25948 size: 10089
ret:-1 st: 0 flags:1 ts:-0.741000
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: 0.960000 pts: 0.960000 pos: 67792 size: 14392
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 52573 size: 11127
ret: 0 st: 0 flags:0 ts:-0.058000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 12771
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size: 10380
ret: 0 st: 0 flags:1 ts: 2.836000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155318 size: 17185
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117165 size: 12730
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155318 size: 17185
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117165 size: 12730
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 32529 size: 12708
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 25948 size: 10089
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 12771
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size: 10380
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155318 size: 17185
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117165 size: 12730
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108745 size: 16158
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83228 size: 12295
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 12771
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size: 10380
ret: 0 st: 0 flags:0 ts:-0.905000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 179 size: 12771
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 187 size: 10380
ret: 0 st: 0 flags:1 ts: 1.989000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 155318 size: 17185
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 117165 size: 12730
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 67792 size: 14392
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 52573 size: 11127
ret:-1 st:-1 flags:1 ts:-0.222493
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.440000 pts: 1.440000 pos: 108745 size: 16158
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83228 size: 12295
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 32529 size: 12708
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 25948 size: 10089
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-h263 b/tests/ref/seek/vsynth_lena-h261
index 3e0c9245dd..dabf6a3014 100644
--- a/tests/ref/seek/vsynth2-h263
+++ b/tests/ref/seek/vsynth_lena-h261
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9645
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9645
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 139428 size: 16159
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126498 size: 11377
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 88646 size: 14393
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 82056 size: 10322
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 139428 size: 16159
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126498 size: 11377
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 45784 size: 12709
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 44668 size: 9404
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 88646 size: 14393
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 82056 size: 10322
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9645
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175860 size: 11707
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175860 size: 11707
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 45784 size: 12709
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 44668 size: 9404
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9645
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175860 size: 11707
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 139428 size: 16159
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126498 size: 11377
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9645
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 12772
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9645
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 195658 size: 17186
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175860 size: 11707
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 88646 size: 14393
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 82056 size: 10322
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 139428 size: 16159
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126498 size: 11377
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 45784 size: 12709
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 44668 size: 9404
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-msmpeg4v2 b/tests/ref/seek/vsynth_lena-h263
index bf992fdc3a..5e50ca3b2a 100644
--- a/tests/ref/seek/vsynth2-msmpeg4v2
+++ b/tests/ref/seek/vsynth_lena-h263
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10381
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10381
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108682 size: 14845
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103706 size: 12296
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69622 size: 13068
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 66796 size: 11128
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 108682 size: 14845
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103706 size: 12296
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36266 size: 11274
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36442 size: 10090
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 69622 size: 13068
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 66796 size: 11128
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10381
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144556 size: 12731
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144556 size: 12731
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36266 size: 11274
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36442 size: 10090
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10381
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144556 size: 12731
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108682 size: 14845
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103706 size: 12296
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10381
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11321
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10381
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 153222 size: 15792
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144556 size: 12731
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69622 size: 13068
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 66796 size: 11128
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 108682 size: 14845
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103706 size: 12296
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36266 size: 11274
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 36442 size: 10090
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-h263p b/tests/ref/seek/vsynth_lena-h263p
index 673f412d49..c87a90672d 100644
--- a/tests/ref/seek/vsynth2-h263p
+++ b/tests/ref/seek/vsynth_lena-h263p
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 36208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 36208
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 733908 size: 56338
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569922 size: 45151
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 448856 size: 50481
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355972 size: 40907
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 733908 size: 56338
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569922 size: 45151
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 210394 size: 43217
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171046 size: 36514
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 448856 size: 50481
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355972 size: 40907
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 36208
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804362 size: 46411
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804362 size: 46411
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 210394 size: 43217
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171046 size: 36514
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 36208
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804362 size: 46411
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 733908 size: 56338
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569922 size: 45151
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 36208
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 43985
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 36208
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:1051592 size: 59232
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804362 size: 46411
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 448856 size: 50481
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355972 size: 40907
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 733908 size: 56338
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569922 size: 45151
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 210394 size: 43217
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171046 size: 36514
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-huffyuv b/tests/ref/seek/vsynth_lena-huffyuv
index a3e176b9ca..79e29a0eea 100644
--- a/tests/ref/seek/vsynth2-huffyuv
+++ b/tests/ref/seek/vsynth_lena-huffyuv
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5758 size:123508
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5758 size:123508
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:6010684 size:136724
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:5745002 size:121152
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2445132 size:126464
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2437998 size:122516
ret:-1 st: 0 flags:1 ts:-0.320000
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.480000 pts: 1.480000 pos:4658492 size:133884
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:4523458 size:122784
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1085808 size:121284
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1093874 size:121320
ret:-1 st: 0 flags:1 ts:-0.760000
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.040000 pts: 1.040000 pos:3211900 size:129428
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3173594 size:122784
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5758 size:123508
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6284380 size:137136
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:5987034 size:120672
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:5466432 size:135664
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:5258654 size:121992
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1944388 size:124456
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1947354 size:122568
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5758 size:123508
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6284380 size:137136
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:5987034 size:120672
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4126904 size:132312
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4032698 size:122544
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 604036 size:120044
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 609910 size:120724
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5724 size:120468
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5758 size:123508
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6284380 size:137136
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:5987034 size:120672
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2698592 size:127564
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2683066 size:122588
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:4926660 size:134484
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:4768982 size:122556
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1451012 size:122720
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1458410 size:121888
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-jpegls b/tests/ref/seek/vsynth_lena-jpegls
new file mode 100644
index 0000000000..c773313ad5
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-jpegls
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:164074
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:164074
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7804122 size:176295
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3172784 size:164643
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.480000 pts: 1.480000 pos:6052978 size:174097
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1402348 size:157283
+ret:-1 st: 0 flags:1 ts:-0.760000
+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.040000 pts: 1.040000 pos:4170252 size:168401
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:164074
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157020 size:176793
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:7101758 size:175326
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2519264 size:162522
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:164074
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157020 size:176793
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5360822 size:172183
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 779838 size:154579
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:164074
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157020 size:176793
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3502832 size:166017
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:6401456 size:174815
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1876420 size:159659
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-ljpeg b/tests/ref/seek/vsynth_lena-ljpeg
new file mode 100644
index 0000000000..bb58fd91fc
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-ljpeg
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 96000
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 96000
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:4478628 size: 94801
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:1900944 size: 95396
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.480000 pts: 1.480000 pos:3525176 size: 95655
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 854326 size: 94566
+ret:-1 st: 0 flags:1 ts:-0.760000
+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.040000 pts: 1.040000 pos:2473780 size: 95580
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 96000
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4668124 size: 94526
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:4098378 size: 95284
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1519186 size: 95341
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 96000
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4668124 size: 94526
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:3142842 size: 95518
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 476884 size: 94192
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 96000
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4668124 size: 94526
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2091790 size: 95459
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:3716442 size: 95546
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1138412 size: 94963
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mjpeg b/tests/ref/seek/vsynth_lena-mjpeg
new file mode 100644
index 0000000000..71f798e929
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mjpeg
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11209
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11209
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 592412 size: 14066
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 232652 size: 12269
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.480000 pts: 1.480000 pos: 453104 size: 13735
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 104118 size: 11213
+ret:-1 st: 0 flags:1 ts:-0.760000
+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.040000 pts: 1.040000 pos: 307404 size: 12723
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11209
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 620564 size: 14125
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 536264 size: 13966
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 184478 size: 11981
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11209
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 620564 size: 14125
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 398934 size: 13340
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 59904 size: 10972
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11209
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 620564 size: 14125
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 257220 size: 12407
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 480710 size: 13831
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 137920 size: 11458
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg1 b/tests/ref/seek/vsynth_lena-mpeg1
new file mode 100644
index 0000000000..0ec751a8b4
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg1
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 9779
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 124255 size: 11796
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 76706 size: 10792
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.440000 pts: NOPTS pos: 124255 size: 11796
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 37721 size: 9873
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.960000 pts: NOPTS pos: 76706 size: 10792
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177099 size: 12057
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177099 size: 12057
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 37721 size: 9873
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177099 size: 12057
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 124255 size: 11796
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9779
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 177099 size: 12057
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 76706 size: 10792
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 124255 size: 11796
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 37721 size: 9873
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg1b b/tests/ref/seek/vsynth_lena-mpeg1b
new file mode 100644
index 0000000000..e079e343f8
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg1b
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 0 size: 11817
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194424 size: 14837
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 80757 size: 13267
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.320000 pts: NOPTS pos: 133899 size: 14470
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 80757 size: 13267
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.840000 pts: NOPTS pos: 80757 size: 13267
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194424 size: 14837
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194424 size: 14837
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: NOPTS pos: 34797 size: 12009
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194424 size: 14837
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 133899 size: 14470
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11817
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.800000 pts: NOPTS pos: 194424 size: 14837
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 133899 size: 14470
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: NOPTS pos: 133899 size: 14470
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.840000 pts: NOPTS pos: 80757 size: 13267
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg2-422 b/tests/ref/seek/vsynth_lena-mpeg2-422
new file mode 100644
index 0000000000..06d8f7ac3a
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg2-422
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325397 size: 19967
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 200747 size: 22575
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.360000 pts: NOPTS pos: 265466 size: 21329
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 104454 size: 28984
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.880000 pts: NOPTS pos: 200747 size: 22575
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325397 size: 19967
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325397 size: 19967
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 104454 size: 28984
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325397 size: 19967
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 265466 size: 21329
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 17497
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 325397 size: 19967
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 265466 size: 21329
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 265466 size: 21329
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 200747 size: 22575
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg2-idct-int b/tests/ref/seek/vsynth_lena-mpeg2-idct-int
new file mode 100644
index 0000000000..b096f6fe7c
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg2-idct-int
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.440000 pts: NOPTS pos: 127925 size: 11918
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.960000 pts: NOPTS pos: 79103 size: 10909
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9911
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 182138 size: 12183
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 79103 size: 10909
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 127925 size: 11918
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 38992 size: 9985
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg2-ilace b/tests/ref/seek/vsynth_lena-mpeg2-ilace
new file mode 100644
index 0000000000..d2a7838484
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg2-ilace
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 132603 size: 11970
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 82152 size: 10965
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.440000 pts: NOPTS pos: 132603 size: 11970
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 40546 size: 10045
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.960000 pts: NOPTS pos: 82152 size: 10965
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188425 size: 12232
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188425 size: 12232
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 40546 size: 10045
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188425 size: 12232
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 132603 size: 11970
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 188425 size: 12232
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 82152 size: 10965
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 132603 size: 11970
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 40546 size: 10045
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg2-ivlc-qprd b/tests/ref/seek/vsynth_lena-mpeg2-ivlc-qprd
new file mode 100644
index 0000000000..330dc16a47
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg2-ivlc-qprd
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 164167 size: 13921
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.360000 pts: NOPTS pos: 196681 size: 13159
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 98748 size: 29165
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.880000 pts: NOPTS pos: 164167 size: 13921
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 98748 size: 29165
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 196681 size: 13159
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 16239
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 227500 size: 12725
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 196681 size: 13159
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 196681 size: 13159
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 164167 size: 13921
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg2-thread b/tests/ref/seek/vsynth_lena-mpeg2-thread
new file mode 100644
index 0000000000..8e16f43a9a
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg2-thread
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158232 size: 12232
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67783 size: 10965
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.360000 pts: NOPTS pos: 110336 size: 11970
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30747 size: 10045
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.880000 pts: NOPTS pos: 67783 size: 10965
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158232 size: 12232
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158232 size: 12232
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30747 size: 10045
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158232 size: 12232
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110336 size: 11970
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9961
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 158232 size: 12232
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110336 size: 11970
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110336 size: 11970
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67783 size: 10965
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg2-thread-ivlc b/tests/ref/seek/vsynth_lena-mpeg2-thread-ivlc
new file mode 100644
index 0000000000..49ec819f76
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg2-thread-ivlc
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157685 size: 11930
+ret: 0 st: 0 flags:0 ts: 0.788334
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67716 size: 10791
+ret:-1 st: 0 flags:1 ts:-0.317499
+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.360000 pts: NOPTS pos: 110086 size: 11697
+ret: 0 st: 0 flags:0 ts: 0.365002
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30744 size: 9980
+ret:-1 st: 0 flags:1 ts:-0.740831
+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: 0.880000 pts: NOPTS pos: 67716 size: 10791
+ret: 0 st: 0 flags:0 ts:-0.058330
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954
+ret: 0 st: 0 flags:1 ts: 2.835837
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157685 size: 11930
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157685 size: 11930
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 30744 size: 9980
+ret: 0 st: 0 flags:0 ts:-0.481662
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954
+ret: 0 st: 0 flags:1 ts: 2.412505
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157685 size: 11930
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110086 size: 11697
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954
+ret: 0 st: 0 flags:0 ts:-0.904994
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 9954
+ret: 0 st: 0 flags:1 ts: 1.989173
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 157685 size: 11930
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110086 size: 11697
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.671674
+ret: 0 st: 0 flags:1 ts: 1.565841
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 110086 size: 11697
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 67716 size: 10791
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-mpeg4 b/tests/ref/seek/vsynth_lena-mpeg4
new file mode 100644
index 0000000000..b1c8a19db8
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-mpeg4
@@ -0,0 +1,50 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 75140 size: 10776
+ret: 0 st: 0 flags:0 ts: 0.788359
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 47228 size: 9634
+ret: 0 st: 0 flags:1 ts:-0.317500
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+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.440000 pts: 1.440000 pos: 75140 size: 10776
+ret: 0 st: 0 flags:0 ts: 0.365000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 23271 size: 8524
+ret: 0 st: 0 flags:1 ts:-0.740859
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+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: 0.960000 pts: 0.960000 pos: 47228 size: 9634
+ret: 0 st: 0 flags:0 ts:-0.058359
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+ret: 0 st: 0 flags:1 ts: 2.835859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106181 size: 11182
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106181 size: 11182
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 23271 size: 8524
+ret: 0 st: 0 flags:0 ts:-0.481641
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+ret: 0 st: 0 flags:1 ts: 2.412500
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106181 size: 11182
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 75140 size: 10776
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+ret: 0 st: 0 flags:0 ts:-0.905000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+ret: 0 st: 0 flags:1 ts: 1.989141
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 106181 size: 11182
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 47228 size: 9634
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
+ret:-1 st: 0 flags:0 ts: 2.671641
+ret: 0 st: 0 flags:1 ts: 1.565859
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 75140 size: 10776
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 23271 size: 8524
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 8719
diff --git a/tests/ref/seek/vsynth2-mpeg2-thread-ivlc b/tests/ref/seek/vsynth_lena-mpeg4-adap
index a799f0a782..0611ee4511 100644
--- a/tests/ref/seek/vsynth2-mpeg2-thread-ivlc
+++ b/tests/ref/seek/vsynth_lena-mpeg4-adap
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11855
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11855
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199749 size: 15473
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174446 size: 16883
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 82883 size: 13398
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98220 size: 17063
ret:-1 st: 0 flags:1 ts:-0.320000
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.360000 pts: NOPTS pos: 137402 size: 14693
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 135582 size: 17525
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37332 size: 12068
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 59446 size: 17261
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.880000 pts: NOPTS pos: 82883 size: 13398
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98220 size: 17063
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11855
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199749 size: 15473
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174446 size: 16883
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199749 size: 15473
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174446 size: 16883
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37332 size: 12068
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 59446 size: 17261
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11855
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199749 size: 15473
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174446 size: 16883
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 137402 size: 14693
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 135582 size: 17525
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11855
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 11855
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 6855
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 199749 size: 15473
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 174446 size: 16883
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 82883 size: 13398
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98220 size: 17063
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 137402 size: 14693
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 135582 size: 17525
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 82883 size: 13398
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 98220 size: 17063
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-msmpeg4 b/tests/ref/seek/vsynth_lena-mpeg4-adv
index c2a708166a..9a51eaeaea 100644
--- a/tests/ref/seek/vsynth2-msmpeg4
+++ b/tests/ref/seek/vsynth_lena-mpeg4-adv
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8653
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8653
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 107648 size: 14494
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91722 size: 11013
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 68772 size: 12670
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 59496 size: 9815
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 107648 size: 14494
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91722 size: 11013
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35828 size: 10859
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31936 size: 8753
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 68772 size: 12670
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 59496 size: 9815
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8653
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127616 size: 11279
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127616 size: 11279
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35828 size: 10859
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31936 size: 8753
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8653
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127616 size: 11279
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 107648 size: 14494
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91722 size: 11013
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8653
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10925
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8653
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 152100 size: 15457
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127616 size: 11279
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 68772 size: 12670
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 59496 size: 9815
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 107648 size: 14494
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 91722 size: 11013
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35828 size: 10859
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31936 size: 8753
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4-adv b/tests/ref/seek/vsynth_lena-mpeg4-error
index 06d88ae796..9608a7b34c 100644
--- a/tests/ref/seek/vsynth2-mpeg4-adv
+++ b/tests/ref/seek/vsynth_lena-mpeg4-error
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9729
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9729
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 118586 size: 14495
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113186 size: 15063
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 75418 size: 12802
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 73146 size: 10235
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 118586 size: 14495
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113186 size: 15063
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38714 size: 11015
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38232 size: 10303
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 75418 size: 12802
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 73146 size: 10235
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9729
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 163068 size: 13980
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 163068 size: 13980
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38714 size: 11015
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38232 size: 10303
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9729
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 163068 size: 13980
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 118586 size: 14495
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113186 size: 15063
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9729
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 10951
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9729
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 168206 size: 15537
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 163068 size: 13980
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 75418 size: 12802
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 73146 size: 10235
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 118586 size: 14495
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113186 size: 15063
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38714 size: 11015
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 38232 size: 10303
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-wmv2 b/tests/ref/seek/vsynth_lena-mpeg4-nr
index 3ba67649e1..6de31b7f08 100644
--- a/tests/ref/seek/vsynth2-wmv2
+++ b/tests/ref/seek/vsynth_lena-mpeg4-nr
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10673
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10673
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 109154 size: 15153
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100656 size: 12464
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69348 size: 13297
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 65492 size: 11180
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 109154 size: 15153
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100656 size: 12464
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35954 size: 11342
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35314 size: 9987
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 69348 size: 13297
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 65492 size: 11180
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10673
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139376 size: 12911
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139376 size: 12911
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35954 size: 11342
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35314 size: 9987
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10673
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139376 size: 12911
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 109154 size: 15153
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100656 size: 12464
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10673
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11264
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 10673
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 154736 size: 16130
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139376 size: 12911
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 69348 size: 13297
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 65492 size: 11180
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 109154 size: 15153
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100656 size: 12464
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35954 size: 11342
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 35314 size: 9987
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4-nr b/tests/ref/seek/vsynth_lena-mpeg4-nsse
index e0abfe8544..e73ce6033c 100644
--- a/tests/ref/seek/vsynth2-mpeg4-nr
+++ b/tests/ref/seek/vsynth_lena-mpeg4-nsse
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11937
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11937
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 130650 size: 16609
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 127876 size: 15054
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83222 size: 14678
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 81656 size: 13376
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 130650 size: 16609
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 127876 size: 15054
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42834 size: 12656
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42642 size: 11805
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 83222 size: 14678
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 81656 size: 13376
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11937
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 179516 size: 15553
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 179516 size: 15553
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42834 size: 12656
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42642 size: 11805
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11937
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 179516 size: 15553
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 130650 size: 16609
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 127876 size: 15054
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11937
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 13402
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 11937
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 184792 size: 17684
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 179516 size: 15553
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83222 size: 14678
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 81656 size: 13376
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 130650 size: 16609
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 127876 size: 15054
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42834 size: 12656
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 42642 size: 11805
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4-qpel b/tests/ref/seek/vsynth_lena-mpeg4-qpel
index 6f23d126ab..cf5da07680 100644
--- a/tests/ref/seek/vsynth2-mpeg4-qpel
+++ b/tests/ref/seek/vsynth_lena-mpeg4-qpel
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 11938
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 11938
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141530 size: 15554
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 79512 size: 17332
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64114 size: 13377
ret:-1 st: 0 flags:1 ts:-0.320000
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.360000 pts: NOPTS pos: 126396 size: 19941
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 100340 size: 15055
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 39736 size: 14805
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 32840 size: 11806
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.880000 pts: NOPTS pos: 79512 size: 17332
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64114 size: 13377
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 11938
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141530 size: 15554
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141530 size: 15554
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 39736 size: 14805
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 32840 size: 11806
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 11938
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141530 size: 15554
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 126396 size: 19941
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 100340 size: 15055
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 11938
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 15135
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 11938
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 180366 size: 21181
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 141530 size: 15554
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 79512 size: 17332
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64114 size: 13377
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 126396 size: 19941
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 100340 size: 15055
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 79512 size: 17332
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 64114 size: 13377
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg2-ilace b/tests/ref/seek/vsynth_lena-mpeg4-qprd
index 590d10d3a9..b92e3d225d 100644
--- a/tests/ref/seek/vsynth2-mpeg2-ilace
+++ b/tests/ref/seek/vsynth_lena-mpeg4-qprd
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14873
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14873
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 177672 size: 15343
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211034 size: 14638
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 109003 size: 13947
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150658 size: 14502
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: NOPTS pos: 177672 size: 15343
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180782 size: 14371
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 51717 size: 12445
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 93028 size: 29366
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: NOPTS pos: 109003 size: 13947
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150658 size: 14502
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14873
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253343 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211034 size: 14638
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253343 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211034 size: 14638
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 51717 size: 12445
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 93028 size: 29366
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14873
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253343 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211034 size: 14638
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 177672 size: 15343
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180782 size: 14371
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14873
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14873
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: NOPTS pos: 253343 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 211034 size: 14638
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: NOPTS pos: 109003 size: 13947
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150658 size: 14502
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: NOPTS pos: 177672 size: 15343
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180782 size: 14371
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: NOPTS pos: 51717 size: 12445
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 150658 size: 14502
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg2-thread b/tests/ref/seek/vsynth_lena-mpeg4-rc
index 644513bf8c..e1994af948 100644
--- a/tests/ref/seek/vsynth2-mpeg2-thread
+++ b/tests/ref/seek/vsynth_lena-mpeg4-rc
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 15766
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 15766
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201811 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207954 size: 13826
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 83616 size: 13947
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153788 size: 13377
ret:-1 st: 0 flags:1 ts:-0.320000
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.360000 pts: NOPTS pos: 138764 size: 15343
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180950 size: 13326
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37634 size: 12445
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 94578 size: 32807
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.880000 pts: NOPTS pos: 83616 size: 13947
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153788 size: 13377
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 15766
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201811 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207954 size: 13826
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201811 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207954 size: 13826
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 37634 size: 12445
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 94578 size: 32807
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 15766
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201811 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207954 size: 13826
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 138764 size: 15343
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180950 size: 13326
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 15766
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 0 size: 12146
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 15766
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 201811 size: 16183
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 207954 size: 13826
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 83616 size: 13947
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153788 size: 13377
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 138764 size: 15343
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 180950 size: 13326
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 83616 size: 13947
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 153788 size: 13377
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-mpeg4-qprd b/tests/ref/seek/vsynth_lena-mpeg4-thread
index 675e993a9b..287b96d566 100644
--- a/tests/ref/seek/vsynth2-mpeg4-qprd
+++ b/tests/ref/seek/vsynth_lena-mpeg4-thread
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14874
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14874
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228190 size: 16323
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 169864 size: 14172
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162160 size: 16462
ret:-1 st: 0 flags:1 ts:-0.320000
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.360000 pts: NOPTS pos: 198340 size: 15560
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 195334 size: 16153
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 111330 size: 29024
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 97836 size: 33332
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.880000 pts: NOPTS pos: 169864 size: 14172
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162160 size: 16462
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14874
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228190 size: 16323
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228190 size: 16323
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 111330 size: 29024
+ret: 0 st: 0 flags:1 dts: 0.400000 pts: NOPTS pos: 97836 size: 33332
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14874
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228190 size: 16323
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 198340 size: 15560
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 195334 size: 16153
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14874
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5648 size: 16904
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 5652 size: 14874
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228068 size: 15339
+ret: 0 st: 0 flags:1 dts: 1.840000 pts: NOPTS pos: 228190 size: 16323
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 169864 size: 14172
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162160 size: 16462
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 198340 size: 15560
+ret: 0 st: 0 flags:1 dts: 1.360000 pts: NOPTS pos: 195334 size: 16153
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 169864 size: 14172
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: NOPTS pos: 162160 size: 16462
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-h261 b/tests/ref/seek/vsynth_lena-msmpeg4
index 4aa0c43cc9..0bb9f75056 100644
--- a/tests/ref/seek/vsynth2-h261
+++ b/tests/ref/seek/vsynth_lena-msmpeg4
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8637
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8637
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 168350 size: 14793
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82512 size: 10783
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 106950 size: 13195
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 53850 size: 9624
ret:-1 st: 0 flags:1 ts:-0.320000
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.440000 pts: 1.440000 pos: 168350 size: 14793
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82512 size: 10783
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 55568 size: 11639
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29392 size: 8502
ret:-1 st: 0 flags:1 ts:-0.760000
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: 0.960000 pts: 0.960000 pos: 106950 size: 13195
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 53850 size: 9624
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8637
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114260 size: 11180
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114260 size: 11180
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 55568 size: 11639
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29392 size: 8502
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8637
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114260 size: 11180
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 168350 size: 14793
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82512 size: 10783
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8637
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size: 11732
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8637
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 237672 size: 15734
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114260 size: 11180
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 106950 size: 13195
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 53850 size: 9624
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 168350 size: 14793
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 82512 size: 10783
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 55568 size: 11639
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29392 size: 8502
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-msmpeg4v2 b/tests/ref/seek/vsynth_lena-msmpeg4v2
new file mode 100644
index 0000000000..27ed0ed5a7
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-msmpeg4v2
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9003
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9003
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83874 size: 11165
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54782 size: 10010
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.440000 pts: 1.440000 pos: 83874 size: 11165
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29774 size: 8869
+ret:-1 st: 0 flags:1 ts:-0.760000
+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: 0.960000 pts: 0.960000 pos: 54782 size: 10010
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9003
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116116 size: 11578
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116116 size: 11578
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29774 size: 8869
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9003
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116116 size: 11578
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83874 size: 11165
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9003
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 9003
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116116 size: 11578
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54782 size: 10010
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83874 size: 11165
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29774 size: 8869
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-rgb b/tests/ref/seek/vsynth_lena-rgb
index 91f7260bfb..8173ca988a 100644
--- a/tests/ref/seek/vsynth2-rgb
+++ b/tests/ref/seek/vsynth_lena-rgb
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:304128
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:304128
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:304128
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:304128
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:14300040 size:304128
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:14300044 size:304128
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:6088368 size:304128
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:6088372 size:304128
ret:-1 st: 0 flags:1 ts:-0.320000
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.480000 pts: 1.480000 pos:11258680 size:304128
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:11258684 size:304128
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2742872 size:304128
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2742876 size:304128
ret:-1 st: 0 flags:1 ts:-0.760000
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.040000 pts: 1.040000 pos:7913184 size:304128
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:7913188 size:304128
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:304128
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:304128
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908312 size:304128
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908316 size:304128
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:13083496 size:304128
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:13083500 size:304128
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4871824 size:304128
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4871828 size:304128
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:304128
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:304128
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908312 size:304128
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908316 size:304128
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:10042136 size:304128
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:10042140 size:304128
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1526328 size:304128
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1526332 size:304128
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:304128
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:304128
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908312 size:304128
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908316 size:304128
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6696640 size:304128
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6696644 size:304128
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:11866952 size:304128
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:11866956 size:304128
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3655280 size:304128
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3655284 size:304128
ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-roqvideo b/tests/ref/seek/vsynth_lena-roqvideo
index 6ed78b54ed..50a0a335c7 100644
--- a/tests/ref/seek/vsynth2-roqvideo
+++ b/tests/ref/seek/vsynth_lena-roqvideo
@@ -1,4 +1,4 @@
-ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.000000 pos: 24 size: 25810
+ret: 0 st: 0 flags:0 dts: 0.000000 pts: 0.000000 pos: 24 size: 26814
ret:-1 st:-1 flags:0 ts:-1.000000
ret:-1 st:-1 flags:1 ts: 1.894167
ret:-1 st: 0 flags:0 ts: 0.800000
diff --git a/tests/ref/seek/vsynth2-rv10 b/tests/ref/seek/vsynth_lena-rv10
index e31a7f9f10..818040def9 100644
--- a/tests/ref/seek/vsynth2-rv10
+++ b/tests/ref/seek/vsynth_lena-rv10
@@ -1,52 +1,52 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret:-1 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83441 size: 14400
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61592 size: 11135
ret: 0 st: 0 flags:1 ts:-0.317000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139566 size: 12738
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134324 size: 16167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98608 size: 12303
ret: 0 st: 0 flags:0 ts: 0.365000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 12716
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31132 size: 10097
ret: 0 st: 0 flags:1 ts:-0.741000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139566 size: 12738
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83441 size: 14400
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61592 size: 11135
ret: 0 st: 0 flags:0 ts:-0.058000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st: 0 flags:1 ts: 2.836000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139566 size: 12738
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139566 size: 12738
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 12716
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31132 size: 10097
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139566 size: 12738
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134324 size: 16167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98608 size: 12303
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st: 0 flags:0 ts:-0.905000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st: 0 flags:1 ts: 1.989000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139566 size: 12738
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83441 size: 14400
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61592 size: 11135
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
ret: 0 st: 0 flags:0 ts: 2.672000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 190667 size: 17194
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139566 size: 12738
ret: 0 st: 0 flags:1 ts: 1.566000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134324 size: 16167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98608 size: 12303
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 12716
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 31132 size: 10097
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 12779
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 10388
diff --git a/tests/ref/seek/vsynth2-rv20 b/tests/ref/seek/vsynth_lena-rv20
index 0a69c7165e..7f1ad39243 100644
--- a/tests/ref/seek/vsynth2-rv20
+++ b/tests/ref/seek/vsynth_lena-rv20
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83421 size: 13120
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61133 size: 10166
ret: 0 st: 0 flags:1 ts:-0.317000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139147 size: 11803
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344
ret: 0 st: 0 flags:0 ts: 0.365000
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 11414
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 30753 size: 9101
ret: 0 st: 0 flags:1 ts:-0.741000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139147 size: 11803
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83421 size: 13120
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61133 size: 10166
ret: 0 st: 0 flags:0 ts:-0.058000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st: 0 flags:1 ts: 2.836000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139147 size: 11803
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139147 size: 11803
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 11414
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 30753 size: 9101
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139147 size: 11803
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st: 0 flags:0 ts:-0.905000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st: 0 flags:1 ts: 1.989000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139147 size: 11803
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 83421 size: 13120
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 61133 size: 10166
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
ret: 0 st: 0 flags:0 ts: 2.672000
-ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 191423 size: 15859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139147 size: 11803
ret: 0 st: 0 flags:1 ts: 1.566000
-ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 134767 size: 14896
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 98158 size: 11344
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 40479 size: 11414
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 30753 size: 9101
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 11720
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 239 size: 9361
diff --git a/tests/ref/seek/vsynth_lena-snow b/tests/ref/seek/vsynth_lena-snow
new file mode 100644
index 0000000000..33d6c27463
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-snow
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 3035
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 3035
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 39806 size: 3640
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 27442 size: 3494
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.440000 pts: 1.440000 pos: 39806 size: 3640
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 16134 size: 3244
+ret:-1 st: 0 flags:1 ts:-0.760000
+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: 0.960000 pts: 0.960000 pos: 27442 size: 3494
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 3035
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 52608 size: 3582
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 52608 size: 3582
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 16134 size: 3244
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 3035
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 52608 size: 3582
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 39806 size: 3640
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 3035
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 3035
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 52608 size: 3582
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 27442 size: 3494
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 39806 size: 3640
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 16134 size: 3244
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-snow-ll b/tests/ref/seek/vsynth_lena-snow-ll
new file mode 100644
index 0000000000..039db705d3
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-snow-ll
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 72476
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 72476
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902792 size: 78837
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1239094 size: 74994
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.440000 pts: 1.440000 pos:1902792 size: 78837
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605632 size: 71059
+ret:-1 st: 0 flags:1 ts:-0.760000
+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: 0.960000 pts: 0.960000 pos:1239094 size: 74994
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 72476
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585618 size: 79731
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585618 size: 79731
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605632 size: 71059
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 72476
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585618 size: 79731
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902792 size: 78837
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 72476
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 72476
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585618 size: 79731
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1239094 size: 74994
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902792 size: 78837
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605632 size: 71059
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-svq1 b/tests/ref/seek/vsynth_lena-svq1
new file mode 100644
index 0000000000..33fe33e916
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-svq1
@@ -0,0 +1,50 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 517568 size: 25636
+ret: 0 st: 0 flags:0 ts: 0.788359
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326556 size: 23552
+ret: 0 st: 0 flags:1 ts:-0.317500
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+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.440000 pts: 1.440000 pos: 517568 size: 25636
+ret: 0 st: 0 flags:0 ts: 0.365000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 157040 size: 21896
+ret: 0 st: 0 flags:1 ts:-0.740859
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+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: 0.960000 pts: 0.960000 pos: 326556 size: 23552
+ret: 0 st: 0 flags:0 ts:-0.058359
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+ret: 0 st: 0 flags:1 ts: 2.835859
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 157040 size: 21896
+ret: 0 st: 0 flags:0 ts:-0.481641
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+ret: 0 st: 0 flags:1 ts: 2.412500
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 517568 size: 25636
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+ret: 0 st: 0 flags:0 ts:-0.905000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+ret: 0 st: 0 flags:1 ts: 1.989141
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 722804 size: 25888
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 326556 size: 23552
+ret: 0 st:-1 flags:1 ts:-0.222493
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
+ret:-1 st: 0 flags:0 ts: 2.671641
+ret: 0 st: 0 flags:1 ts: 1.565859
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 517568 size: 25636
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 157040 size: 21896
+ret: 0 st:-1 flags:1 ts:-0.645825
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 22300
diff --git a/tests/ref/seek/vsynth_lena-wmv1 b/tests/ref/seek/vsynth_lena-wmv1
new file mode 100644
index 0000000000..125e6cd3c4
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-wmv1
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8990
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8990
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83746 size: 11099
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54762 size: 9931
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.440000 pts: 1.440000 pos: 83746 size: 11099
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29798 size: 8796
+ret:-1 st: 0 flags:1 ts:-0.760000
+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: 0.960000 pts: 0.960000 pos: 54762 size: 9931
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8990
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115810 size: 11486
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115810 size: 11486
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29798 size: 8796
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8990
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115810 size: 11486
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83746 size: 11099
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8990
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size: 8990
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115810 size: 11486
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54762 size: 9931
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83746 size: 11099
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29798 size: 8796
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth_lena-wmv2 b/tests/ref/seek/vsynth_lena-wmv2
new file mode 100644
index 0000000000..ffa576208b
--- /dev/null
+++ b/tests/ref/seek/vsynth_lena-wmv2
@@ -0,0 +1,46 @@
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 8917
+ret: 0 st:-1 flags:0 ts:-1.000000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 8917
+ret: 0 st:-1 flags:1 ts: 1.894167
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83768 size: 11169
+ret: 0 st: 0 flags:0 ts: 0.800000
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54538 size: 9989
+ret:-1 st: 0 flags:1 ts:-0.320000
+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.440000 pts: 1.440000 pos: 83768 size: 11169
+ret: 0 st: 0 flags:0 ts: 0.360000
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29592 size: 8839
+ret:-1 st: 0 flags:1 ts:-0.760000
+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: 0.960000 pts: 0.960000 pos: 54538 size: 9989
+ret: 0 st: 0 flags:0 ts:-0.040000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 8917
+ret: 0 st: 0 flags:1 ts: 2.840000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116070 size: 11554
+ret: 0 st:-1 flags:0 ts: 1.730004
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116070 size: 11554
+ret: 0 st:-1 flags:1 ts: 0.624171
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29592 size: 8839
+ret: 0 st: 0 flags:0 ts:-0.480000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 8917
+ret: 0 st: 0 flags:1 ts: 2.400000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116070 size: 11554
+ret: 0 st:-1 flags:0 ts: 1.306672
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83768 size: 11169
+ret: 0 st:-1 flags:1 ts: 0.200839
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 8917
+ret: 0 st: 0 flags:0 ts:-0.920000
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5656 size: 8917
+ret: 0 st: 0 flags:1 ts: 2.000000
+ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116070 size: 11554
+ret: 0 st:-1 flags:0 ts: 0.883340
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 54538 size: 9989
+ret:-1 st:-1 flags:1 ts:-0.222493
+ret:-1 st: 0 flags:0 ts: 2.680000
+ret: 0 st: 0 flags:1 ts: 1.560000
+ret: 0 st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 83768 size: 11169
+ret: 0 st:-1 flags:0 ts: 0.460008
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 29592 size: 8839
+ret:-1 st:-1 flags:1 ts:-0.645825
diff --git a/tests/ref/seek/vsynth2-yuv b/tests/ref/seek/vsynth_lena-yuv
index d440761cf7..f899d7f518 100644
--- a/tests/ref/seek/vsynth2-yuv
+++ b/tests/ref/seek/vsynth_lena-yuv
@@ -1,46 +1,46 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:152064
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:152064
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:152064
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:152064
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7153032 size:152064
+ret: 0 st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7153036 size:152064
ret: 0 st: 0 flags:0 ts: 0.800000
-ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3047088 size:152064
+ret: 0 st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3047092 size:152064
ret:-1 st: 0 flags:1 ts:-0.320000
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.480000 pts: 1.480000 pos:5632312 size:152064
+ret: 0 st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:5632316 size:152064
ret: 0 st: 0 flags:0 ts: 0.360000
-ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1374296 size:152064
+ret: 0 st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1374300 size:152064
ret:-1 st: 0 flags:1 ts:-0.760000
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.040000 pts: 1.040000 pos:3959520 size:152064
+ret: 0 st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3959524 size:152064
ret: 0 st: 0 flags:0 ts:-0.040000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:152064
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:152064
ret: 0 st: 0 flags:1 ts: 2.840000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457176 size:152064
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457180 size:152064
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:6544744 size:152064
+ret: 0 st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:6544748 size:152064
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2438800 size:152064
+ret: 0 st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2438804 size:152064
ret: 0 st: 0 flags:0 ts:-0.480000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:152064
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:152064
ret: 0 st: 0 flags:1 ts: 2.400000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457176 size:152064
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457180 size:152064
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5024024 size:152064
+ret: 0 st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5024028 size:152064
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 766008 size:152064
+ret: 0 st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 766012 size:152064
ret: 0 st: 0 flags:0 ts:-0.920000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5648 size:152064
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 5652 size:152064
ret: 0 st: 0 flags:1 ts: 2.000000
-ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457176 size:152064
+ret: 0 st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457180 size:152064
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3351232 size:152064
+ret: 0 st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3351236 size:152064
ret:-1 st:-1 flags:1 ts:-0.222493
ret:-1 st: 0 flags:0 ts: 2.680000
ret: 0 st: 0 flags:1 ts: 1.560000
-ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:5936456 size:152064
+ret: 0 st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:5936460 size:152064
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1830512 size:152064
+ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1830516 size:152064
ret:-1 st:-1 flags:1 ts:-0.645825