[FFmpeg-cvslog] riff: do not write empty INFO tags

Victor Vasiliev git at videolan.org
Wed Oct 17 14:59:47 CEST 2012


ffmpeg | branch: master | Victor Vasiliev <vasilvv at gmail.com> | Tue Oct 16 10:31:22 2012 +0200| [0bca0283ccded5e32da143a462168ad1988a58fd] | committer: Anton Khirnov

riff: do not write empty INFO tags

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0bca0283ccded5e32da143a462168ad1988a58fd
---

 libavformat/riff.c                  |   20 +++++++++++++++++-
 tests/ref/fate/v410enc              |    2 +-
 tests/ref/fate/vsynth1-asv1         |    4 ++--
 tests/ref/fate/vsynth1-asv2         |    4 ++--
 tests/ref/fate/vsynth1-cljr         |    4 ++--
 tests/ref/fate/vsynth1-ffv1         |    4 ++--
 tests/ref/fate/vsynth1-ffvhuff      |    4 ++--
 tests/ref/fate/vsynth1-h261         |    4 ++--
 tests/ref/fate/vsynth1-h263         |    4 ++--
 tests/ref/fate/vsynth1-h263-obmc    |    4 ++--
 tests/ref/fate/vsynth1-h263p        |    4 ++--
 tests/ref/fate/vsynth1-huffyuv      |    4 ++--
 tests/ref/fate/vsynth1-jpegls       |    4 ++--
 tests/ref/fate/vsynth1-ljpeg        |    4 ++--
 tests/ref/fate/vsynth1-mjpeg        |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-adap   |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-adv    |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-error  |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-nr     |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-qpel   |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-qprd   |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-rc     |    4 ++--
 tests/ref/fate/vsynth1-mpeg4-thread |    4 ++--
 tests/ref/fate/vsynth1-msmpeg4      |    4 ++--
 tests/ref/fate/vsynth1-msmpeg4v2    |    4 ++--
 tests/ref/fate/vsynth1-rgb          |    4 ++--
 tests/ref/fate/vsynth1-snow         |    4 ++--
 tests/ref/fate/vsynth1-snow-hpel    |    4 ++--
 tests/ref/fate/vsynth1-snow-ll      |    4 ++--
 tests/ref/fate/vsynth1-v210         |    4 ++--
 tests/ref/fate/vsynth1-wmv1         |    4 ++--
 tests/ref/fate/vsynth1-wmv2         |    4 ++--
 tests/ref/fate/vsynth1-yuv          |    4 ++--
 tests/ref/fate/vsynth2-asv1         |    4 ++--
 tests/ref/fate/vsynth2-asv2         |    4 ++--
 tests/ref/fate/vsynth2-cljr         |    4 ++--
 tests/ref/fate/vsynth2-ffv1         |    4 ++--
 tests/ref/fate/vsynth2-ffvhuff      |    4 ++--
 tests/ref/fate/vsynth2-h261         |    4 ++--
 tests/ref/fate/vsynth2-h263         |    4 ++--
 tests/ref/fate/vsynth2-h263-obmc    |    4 ++--
 tests/ref/fate/vsynth2-h263p        |    4 ++--
 tests/ref/fate/vsynth2-huffyuv      |    4 ++--
 tests/ref/fate/vsynth2-jpegls       |    4 ++--
 tests/ref/fate/vsynth2-ljpeg        |    4 ++--
 tests/ref/fate/vsynth2-mjpeg        |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-adap   |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-adv    |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-error  |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-nr     |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-qpel   |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-qprd   |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-rc     |    4 ++--
 tests/ref/fate/vsynth2-mpeg4-thread |    4 ++--
 tests/ref/fate/vsynth2-msmpeg4      |    4 ++--
 tests/ref/fate/vsynth2-msmpeg4v2    |    4 ++--
 tests/ref/fate/vsynth2-rgb          |    4 ++--
 tests/ref/fate/vsynth2-snow         |    4 ++--
 tests/ref/fate/vsynth2-snow-hpel    |    4 ++--
 tests/ref/fate/vsynth2-snow-ll      |    4 ++--
 tests/ref/fate/vsynth2-v210         |    4 ++--
 tests/ref/fate/vsynth2-wmv1         |    4 ++--
 tests/ref/fate/vsynth2-wmv2         |    4 ++--
 tests/ref/fate/vsynth2-yuv          |    4 ++--
 tests/ref/lavf/avi                  |    4 ++--
 tests/ref/seek/asv1_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/asv2_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/ffv1_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/h261_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/h263_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/h263p_avi            |   40 +++++++++++++++++------------------
 tests/ref/seek/huffyuv_avi          |   40 +++++++++++++++++------------------
 tests/ref/seek/jpegls_avi           |   40 +++++++++++++++++------------------
 tests/ref/seek/lavf_avi             |   36 +++++++++++++++----------------
 tests/ref/seek/ljpeg_avi            |   40 +++++++++++++++++------------------
 tests/ref/seek/mjpeg_avi            |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_adap_avi       |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_adv_avi        |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_error_avi      |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_nr_avi         |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_qpel_avi       |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_qprd_avi       |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_rc_avi         |   40 +++++++++++++++++------------------
 tests/ref/seek/mpeg4_thread_avi     |   40 +++++++++++++++++------------------
 tests/ref/seek/msmpeg4_avi          |   40 +++++++++++++++++------------------
 tests/ref/seek/msmpeg4v2_avi        |   40 +++++++++++++++++------------------
 tests/ref/seek/rgb_avi              |   40 +++++++++++++++++------------------
 tests/ref/seek/snow_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/snow_ll_avi          |   40 +++++++++++++++++------------------
 tests/ref/seek/wmv1_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/wmv2_avi             |   40 +++++++++++++++++------------------
 tests/ref/seek/yuv_avi              |   40 +++++++++++++++++------------------
 92 files changed, 684 insertions(+), 666 deletions(-)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 3d805d8..d591aa8 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -709,6 +709,19 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
     return 0;
 }
 
+static int riff_has_valid_tags(AVFormatContext *s)
+{
+    int i;
+    AVDictionaryEntry *t = NULL;
+
+    for (i = 0; *ff_riff_tags[i]; i++) {
+        if ((t = av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE)))
+            return 1;
+    }
+
+    return 0;
+}
+
 void ff_riff_write_info_tag(AVIOContext *pb, const char *tag, const char *str)
 {
     int len = strlen(str);
@@ -729,9 +742,14 @@ void ff_riff_write_info(AVFormatContext *s)
     int64_t list_pos;
     AVDictionaryEntry *t = NULL;
 
+    ff_metadata_conv(&s->metadata, ff_riff_info_conv, NULL);
+
+    /* writing empty LIST is not nice and may cause problems */
+    if (!riff_has_valid_tags(s))
+        return;
+
     list_pos = ff_start_tag(pb, "LIST");
     ffio_wfourcc(pb, "INFO");
-    ff_metadata_conv(&s->metadata, ff_riff_info_conv, NULL);
     for (i = 0; *ff_riff_tags[i]; i++) {
         if ((t = av_dict_get(s->metadata, ff_riff_tags[i], NULL, AV_DICT_MATCH_CASE)))
             ff_riff_write_info_tag(s->pb, t->key, t->value);
diff --git a/tests/ref/fate/v410enc b/tests/ref/fate/v410enc
index e5332de..ab219bb 100644
--- a/tests/ref/fate/v410enc
+++ b/tests/ref/fate/v410enc
@@ -1 +1 @@
-979c9a9a09e8eaaf6467b8c22c0ac8bb
+e5c0b1f17d2a64a416dcf9bf7a38d9d9
diff --git a/tests/ref/fate/vsynth1-asv1 b/tests/ref/fate/vsynth1-asv1
index 768729e..e640f1c 100644
--- a/tests/ref/fate/vsynth1-asv1
+++ b/tests/ref/fate/vsynth1-asv1
@@ -1,4 +1,4 @@
-b4ce4698764ef2328346badb7227ecbe *tests/data/fate/vsynth1-asv1.avi
-1489656 tests/data/fate/vsynth1-asv1.avi
+41b011551d23ddadaab1083cb2106d9f *tests/data/fate/vsynth1-asv1.avi
+1489644 tests/data/fate/vsynth1-asv1.avi
 2dfc5dfc2c1cbbc2543257cd3d2df6af *tests/data/fate/vsynth1-asv1.out.rawvideo
 stddev:   20.00 PSNR: 22.11 MAXDIFF:  158 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-asv2 b/tests/ref/fate/vsynth1-asv2
index 38c6cef..6282ad4 100644
--- a/tests/ref/fate/vsynth1-asv2
+++ b/tests/ref/fate/vsynth1-asv2
@@ -1,4 +1,4 @@
-dfba6eaf58e515e324c2b370bfcd9158 *tests/data/fate/vsynth1-asv2.avi
-1456056 tests/data/fate/vsynth1-asv2.avi
+a0773690d0e772ff832adea1e8c16773 *tests/data/fate/vsynth1-asv2.avi
+1456044 tests/data/fate/vsynth1-asv2.avi
 d451be09793cd0f35b6d91fc36e2571a *tests/data/fate/vsynth1-asv2.out.rawvideo
 stddev:   18.82 PSNR: 22.63 MAXDIFF:  131 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-cljr b/tests/ref/fate/vsynth1-cljr
index 41d40c9..cdd6ca2 100644
--- a/tests/ref/fate/vsynth1-cljr
+++ b/tests/ref/fate/vsynth1-cljr
@@ -1,4 +1,4 @@
-b4d3d31da0b4b6873ad8239d113c91d2 *tests/data/fate/vsynth1-cljr.avi
-5075660 tests/data/fate/vsynth1-cljr.avi
+41fc45d5e8bca3cf2be35457b188cdb3 *tests/data/fate/vsynth1-cljr.avi
+5075648 tests/data/fate/vsynth1-cljr.avi
 72e01607bae16527bc6389cf6db00b5f *tests/data/fate/vsynth1-cljr.out.rawvideo
 stddev:    6.95 PSNR: 31.28 MAXDIFF:   86 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-ffv1 b/tests/ref/fate/vsynth1-ffv1
index ab1a582..99787ed 100644
--- a/tests/ref/fate/vsynth1-ffv1
+++ b/tests/ref/fate/vsynth1-ffv1
@@ -1,4 +1,4 @@
-67ddc7edde5cca49290245d881787890 *tests/data/fate/vsynth1-ffv1.avi
-2655376 tests/data/fate/vsynth1-ffv1.avi
+91c237f18bc19975077c85175daed734 *tests/data/fate/vsynth1-ffv1.avi
+2655364 tests/data/fate/vsynth1-ffv1.avi
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffv1.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-ffvhuff b/tests/ref/fate/vsynth1-ffvhuff
index 67f4b35..cf86f57 100644
--- a/tests/ref/fate/vsynth1-ffvhuff
+++ b/tests/ref/fate/vsynth1-ffvhuff
@@ -1,4 +1,4 @@
-da0c0bd12ac141c976ffa6a71832ab4b *tests/data/fate/vsynth1-ffvhuff.avi
-5987208 tests/data/fate/vsynth1-ffvhuff.avi
+2279cfd5efce9dc3435b814f1f95dcbc *tests/data/fate/vsynth1-ffvhuff.avi
+5987196 tests/data/fate/vsynth1-ffvhuff.avi
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffvhuff.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-h261 b/tests/ref/fate/vsynth1-h261
index be7f80a..b350e6f 100644
--- a/tests/ref/fate/vsynth1-h261
+++ b/tests/ref/fate/vsynth1-h261
@@ -1,4 +1,4 @@
-d155470b713aeebacb85980b0d5f2ce3 *tests/data/fate/vsynth1-h261.avi
-707588 tests/data/fate/vsynth1-h261.avi
+d3397557ad8a02d28cb5feeb0b51e5c8 *tests/data/fate/vsynth1-h261.avi
+707576 tests/data/fate/vsynth1-h261.avi
 716e83cb51afb1246bfaa80967df48ea *tests/data/fate/vsynth1-h261.out.rawvideo
 stddev:    9.11 PSNR: 28.93 MAXDIFF:  113 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-h263 b/tests/ref/fate/vsynth1-h263
index 5d5d28a..d5916fa 100644
--- a/tests/ref/fate/vsynth1-h263
+++ b/tests/ref/fate/vsynth1-h263
@@ -1,4 +1,4 @@
-fb4dc9b9eac2628c56cb82cf332e1f58 *tests/data/fate/vsynth1-h263.avi
-659686 tests/data/fate/vsynth1-h263.avi
+130ae384b6f12fd7d18979aa5371523a *tests/data/fate/vsynth1-h263.avi
+659674 tests/data/fate/vsynth1-h263.avi
 1a1ba9a3a63ec1a1a9585fded0a7c954 *tests/data/fate/vsynth1-h263.out.rawvideo
 stddev:    8.03 PSNR: 30.03 MAXDIFF:  103 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-h263-obmc b/tests/ref/fate/vsynth1-h263-obmc
index b7e8f49..ca3d4bf 100644
--- a/tests/ref/fate/vsynth1-h263-obmc
+++ b/tests/ref/fate/vsynth1-h263-obmc
@@ -1,4 +1,4 @@
-8a7be9f9f97673bf8b926b6dcf8a710d *tests/data/fate/vsynth1-h263-obmc.avi
-657366 tests/data/fate/vsynth1-h263-obmc.avi
+4e7faa9203abf55a492802d30a8d80ea *tests/data/fate/vsynth1-h263-obmc.avi
+657354 tests/data/fate/vsynth1-h263-obmc.avi
 eba1d733a0c4b71322a78f718f312599 *tests/data/fate/vsynth1-h263-obmc.out.rawvideo
 stddev:    8.16 PSNR: 29.89 MAXDIFF:  113 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-h263p b/tests/ref/fate/vsynth1-h263p
index 9161a1d..9e1765f 100644
--- a/tests/ref/fate/vsynth1-h263p
+++ b/tests/ref/fate/vsynth1-h263p
@@ -1,4 +1,4 @@
-bbcadeceba295e1dad148aea1e57c370 *tests/data/fate/vsynth1-h263p.avi
-2328348 tests/data/fate/vsynth1-h263p.avi
+b34c1a52bb504e702485d8d268dd1068 *tests/data/fate/vsynth1-h263p.avi
+2328336 tests/data/fate/vsynth1-h263p.avi
 9554cda00c3487ab3ffda2c3ea22fa2f *tests/data/fate/vsynth1-h263p.out.rawvideo
 stddev:    2.06 PSNR: 41.83 MAXDIFF:   20 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-huffyuv b/tests/ref/fate/vsynth1-huffyuv
index e237af5..246da19 100644
--- a/tests/ref/fate/vsynth1-huffyuv
+++ b/tests/ref/fate/vsynth1-huffyuv
@@ -1,4 +1,4 @@
-ace2536fa169d835d0fb332abde28d51 *tests/data/fate/vsynth1-huffyuv.avi
-7933800 tests/data/fate/vsynth1-huffyuv.avi
+cd93849c8e9846490d8f950f1b2319d5 *tests/data/fate/vsynth1-huffyuv.avi
+7933788 tests/data/fate/vsynth1-huffyuv.avi
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-huffyuv.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-jpegls b/tests/ref/fate/vsynth1-jpegls
index 68ae0b2..b54bd5d 100644
--- a/tests/ref/fate/vsynth1-jpegls
+++ b/tests/ref/fate/vsynth1-jpegls
@@ -1,4 +1,4 @@
-870dceeb6d3931dd68b34f0c33be5d26 *tests/data/fate/vsynth1-jpegls.avi
-9089812 tests/data/fate/vsynth1-jpegls.avi
+f8acf917e24ea6c9200f2cdf99744ca9 *tests/data/fate/vsynth1-jpegls.avi
+9089800 tests/data/fate/vsynth1-jpegls.avi
 947cb24ec45a453348ae6fe3fa278071 *tests/data/fate/vsynth1-jpegls.out.rawvideo
 stddev:    2.85 PSNR: 39.03 MAXDIFF:   49 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-ljpeg b/tests/ref/fate/vsynth1-ljpeg
index 4f95667..e229db5 100644
--- a/tests/ref/fate/vsynth1-ljpeg
+++ b/tests/ref/fate/vsynth1-ljpeg
@@ -1,4 +1,4 @@
-9092f306f165b98ab0bb4f576f198ad5 *tests/data/fate/vsynth1-ljpeg.avi
-6312936 tests/data/fate/vsynth1-ljpeg.avi
+2b1a2d5ad7f357df955d8548320d13f7 *tests/data/fate/vsynth1-ljpeg.avi
+6312924 tests/data/fate/vsynth1-ljpeg.avi
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ljpeg.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mjpeg b/tests/ref/fate/vsynth1-mjpeg
index e32f452..3c6fb4b 100644
--- a/tests/ref/fate/vsynth1-mjpeg
+++ b/tests/ref/fate/vsynth1-mjpeg
@@ -1,4 +1,4 @@
-8bbf9513b1822945539f27a6eff3c7fa *tests/data/fate/vsynth1-mjpeg.avi
-1516140 tests/data/fate/vsynth1-mjpeg.avi
+b3ff9a5a9699ceddfee9abbf1b06bb00 *tests/data/fate/vsynth1-mjpeg.avi
+1516128 tests/data/fate/vsynth1-mjpeg.avi
 c6ae81b5b896e4d05ff584311aebdb18 *tests/data/fate/vsynth1-mjpeg.out.rawvideo
 stddev:    7.87 PSNR: 30.21 MAXDIFF:   63 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-adap b/tests/ref/fate/vsynth1-mpeg4-adap
index 12cd15e..840eb47 100644
--- a/tests/ref/fate/vsynth1-mpeg4-adap
+++ b/tests/ref/fate/vsynth1-mpeg4-adap
@@ -1,4 +1,4 @@
-2d870c0da9ab2231ab5fc06981e70399 *tests/data/fate/vsynth1-mpeg4-adap.avi
-403456 tests/data/fate/vsynth1-mpeg4-adap.avi
+eb70136b050f0b216febe57e7766b6a8 *tests/data/fate/vsynth1-mpeg4-adap.avi
+403444 tests/data/fate/vsynth1-mpeg4-adap.avi
 fa2049396479b5f170aa764fed5b2a31 *tests/data/fate/vsynth1-mpeg4-adap.out.rawvideo
 stddev:   14.05 PSNR: 25.17 MAXDIFF:  184 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-adv b/tests/ref/fate/vsynth1-mpeg4-adv
index e223d5f..8ca1f2f 100644
--- a/tests/ref/fate/vsynth1-mpeg4-adv
+++ b/tests/ref/fate/vsynth1-mpeg4-adv
@@ -1,4 +1,4 @@
-7d8eb01fd68d83d62a98585757704d47 *tests/data/fate/vsynth1-mpeg4-adv.avi
-589716 tests/data/fate/vsynth1-mpeg4-adv.avi
+c67ccefff2a038c1a149eceef8b08d1e *tests/data/fate/vsynth1-mpeg4-adv.avi
+589704 tests/data/fate/vsynth1-mpeg4-adv.avi
 f8b226876b1b2c0b98fd6928fd9adbd8 *tests/data/fate/vsynth1-mpeg4-adv.out.rawvideo
 stddev:    6.98 PSNR: 31.25 MAXDIFF:   84 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-error b/tests/ref/fate/vsynth1-mpeg4-error
index 74d5aaa..9180911 100644
--- a/tests/ref/fate/vsynth1-mpeg4-error
+++ b/tests/ref/fate/vsynth1-mpeg4-error
@@ -1,4 +1,4 @@
-7416dfd319f04044d4575dc9d1b406e1 *tests/data/fate/vsynth1-mpeg4-error.avi
-756836 tests/data/fate/vsynth1-mpeg4-error.avi
+63fdc6877c299fe94a061e276ca77bad *tests/data/fate/vsynth1-mpeg4-error.avi
+756824 tests/data/fate/vsynth1-mpeg4-error.avi
 79e94ba32b37759397362cbcb479d4d3 *tests/data/fate/vsynth1-mpeg4-error.out.rawvideo
 stddev:   18.36 PSNR: 22.85 MAXDIFF:  243 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-nr b/tests/ref/fate/vsynth1-mpeg4-nr
index a83f4fd..28f8c6a 100644
--- a/tests/ref/fate/vsynth1-mpeg4-nr
+++ b/tests/ref/fate/vsynth1-mpeg4-nr
@@ -1,4 +1,4 @@
-c02f54157ba08ca12ad979c6308212ad *tests/data/fate/vsynth1-mpeg4-nr.avi
-675638 tests/data/fate/vsynth1-mpeg4-nr.avi
+d9eabca19ca600f18539b35a94663603 *tests/data/fate/vsynth1-mpeg4-nr.avi
+675626 tests/data/fate/vsynth1-mpeg4-nr.avi
 d2b89d5958fb7331f6c9e5b7ecaaa5b6 *tests/data/fate/vsynth1-mpeg4-nr.out.rawvideo
 stddev:    6.99 PSNR: 31.23 MAXDIFF:   86 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-qpel b/tests/ref/fate/vsynth1-mpeg4-qpel
index 254c3ee..1ff1dce 100644
--- a/tests/ref/fate/vsynth1-mpeg4-qpel
+++ b/tests/ref/fate/vsynth1-mpeg4-qpel
@@ -1,4 +1,4 @@
-3bf17c3d04f52988386ce106a2a58976 *tests/data/fate/vsynth1-mpeg4-qpel.avi
-860678 tests/data/fate/vsynth1-mpeg4-qpel.avi
+c02be5680307d8f97a2f442d27f48f3c *tests/data/fate/vsynth1-mpeg4-qpel.avi
+860666 tests/data/fate/vsynth1-mpeg4-qpel.avi
 756928496245ecc701f79eebeec8e5e6 *tests/data/fate/vsynth1-mpeg4-qpel.out.rawvideo
 stddev:    5.63 PSNR: 33.12 MAXDIFF:   70 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-qprd b/tests/ref/fate/vsynth1-mpeg4-qprd
index 1a61654..0b2892d 100644
--- a/tests/ref/fate/vsynth1-mpeg4-qprd
+++ b/tests/ref/fate/vsynth1-mpeg4-qprd
@@ -1,4 +1,4 @@
-d6b7e724a6ad66ab5e4c5a499218b40d *tests/data/fate/vsynth1-mpeg4-qprd.avi
-710944 tests/data/fate/vsynth1-mpeg4-qprd.avi
+5a95ba2c240fcb28963fe90fba4ce52b *tests/data/fate/vsynth1-mpeg4-qprd.avi
+710932 tests/data/fate/vsynth1-mpeg4-qprd.avi
 e65f4c7f343fe2bad1cac44b7da5f7c4 *tests/data/fate/vsynth1-mpeg4-qprd.out.rawvideo
 stddev:    9.79 PSNR: 28.31 MAXDIFF:  176 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-rc b/tests/ref/fate/vsynth1-mpeg4-rc
index 180df10..0c2abf3 100644
--- a/tests/ref/fate/vsynth1-mpeg4-rc
+++ b/tests/ref/fate/vsynth1-mpeg4-rc
@@ -1,4 +1,4 @@
-1c6dadf75f60f4ba59a0fe0b6eaedf57 *tests/data/fate/vsynth1-mpeg4-rc.avi
-830160 tests/data/fate/vsynth1-mpeg4-rc.avi
+49ac6ed095ea2dccf53737e6beab7ad7 *tests/data/fate/vsynth1-mpeg4-rc.avi
+830148 tests/data/fate/vsynth1-mpeg4-rc.avi
 4d95e340db9bc57a559162c039f3784e *tests/data/fate/vsynth1-mpeg4-rc.out.rawvideo
 stddev:   10.24 PSNR: 27.92 MAXDIFF:  196 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-mpeg4-thread b/tests/ref/fate/vsynth1-mpeg4-thread
index 66a5508..b0bf7d8 100644
--- a/tests/ref/fate/vsynth1-mpeg4-thread
+++ b/tests/ref/fate/vsynth1-mpeg4-thread
@@ -1,4 +1,4 @@
-4f4ea04faad7212374919aa1ec7ff994 *tests/data/fate/vsynth1-mpeg4-thread.avi
-774760 tests/data/fate/vsynth1-mpeg4-thread.avi
+c081bc20f1eb048626ea783d8b08a531 *tests/data/fate/vsynth1-mpeg4-thread.avi
+774748 tests/data/fate/vsynth1-mpeg4-thread.avi
 64b96cddf5301990e118978b3a3bcd0d *tests/data/fate/vsynth1-mpeg4-thread.out.rawvideo
 stddev:   10.13 PSNR: 28.02 MAXDIFF:  183 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-msmpeg4 b/tests/ref/fate/vsynth1-msmpeg4
index 55fb06d..cd1b6db 100644
--- a/tests/ref/fate/vsynth1-msmpeg4
+++ b/tests/ref/fate/vsynth1-msmpeg4
@@ -1,4 +1,4 @@
-4b08952b0afceb17ee3db31b67f6b778 *tests/data/fate/vsynth1-msmpeg4.avi
-624718 tests/data/fate/vsynth1-msmpeg4.avi
+c1d04df31764c0ca281dc6fe023287fb *tests/data/fate/vsynth1-msmpeg4.avi
+624706 tests/data/fate/vsynth1-msmpeg4.avi
 5ca72c39e3fc5df8e62f223c869589f5 *tests/data/fate/vsynth1-msmpeg4.out.rawvideo
 stddev:    7.98 PSNR: 30.09 MAXDIFF:  104 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-msmpeg4v2 b/tests/ref/fate/vsynth1-msmpeg4v2
index 839078a..fb9862c 100644
--- a/tests/ref/fate/vsynth1-msmpeg4v2
+++ b/tests/ref/fate/vsynth1-msmpeg4v2
@@ -1,4 +1,4 @@
-88957e35efcc718bce0307627ad3298d *tests/data/fate/vsynth1-msmpeg4v2.avi
-623788 tests/data/fate/vsynth1-msmpeg4v2.avi
+48c76c638b43ee53bde9c58185b25e80 *tests/data/fate/vsynth1-msmpeg4v2.avi
+623776 tests/data/fate/vsynth1-msmpeg4v2.avi
 c6ff1041a0ef62c2a2e5ef519e5e94c4 *tests/data/fate/vsynth1-msmpeg4v2.out.rawvideo
 stddev:    7.97 PSNR: 30.10 MAXDIFF:  105 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-rgb b/tests/ref/fate/vsynth1-rgb
index e9a5b19..f72b737 100644
--- a/tests/ref/fate/vsynth1-rgb
+++ b/tests/ref/fate/vsynth1-rgb
@@ -1,4 +1,4 @@
-05f0719cb52486d9a4beb9cfae3f2571 *tests/data/fate/vsynth1-rgb.avi
-15213260 tests/data/fate/vsynth1-rgb.avi
+d78bcd5828862c3342388ec8a2c34fef *tests/data/fate/vsynth1-rgb.avi
+15213248 tests/data/fate/vsynth1-rgb.avi
 243325fb2cae1a9245efd49aff936327 *tests/data/fate/vsynth1-rgb.out.rawvideo
 stddev:    3.42 PSNR: 37.43 MAXDIFF:   48 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-snow b/tests/ref/fate/vsynth1-snow
index 0b47513..701b5cc 100644
--- a/tests/ref/fate/vsynth1-snow
+++ b/tests/ref/fate/vsynth1-snow
@@ -1,4 +1,4 @@
-d593b3c1a9729ce6dd1721f58fa93712 *tests/data/fate/vsynth1-snow.avi
-136088 tests/data/fate/vsynth1-snow.avi
+44fed844eb715fba0cc2433e7d7713bb *tests/data/fate/vsynth1-snow.avi
+136076 tests/data/fate/vsynth1-snow.avi
 91021b7d6d7908648fe78cc1975af8c4 *tests/data/fate/vsynth1-snow.out.rawvideo
 stddev:   22.77 PSNR: 20.98 MAXDIFF:  172 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-snow-hpel b/tests/ref/fate/vsynth1-snow-hpel
index e2968b1..c22ad0a 100644
--- a/tests/ref/fate/vsynth1-snow-hpel
+++ b/tests/ref/fate/vsynth1-snow-hpel
@@ -1,4 +1,4 @@
-301755ff5dcd31c2aefc8f103cfc2917 *tests/data/fate/vsynth1-snow-hpel.avi
-138712 tests/data/fate/vsynth1-snow-hpel.avi
+f60c8cb8f41b66bc38df87e9bdb84b34 *tests/data/fate/vsynth1-snow-hpel.avi
+138700 tests/data/fate/vsynth1-snow-hpel.avi
 d6845c8f1310e041afdcebc6bbfc449b *tests/data/fate/vsynth1-snow-hpel.out.rawvideo
 stddev:   22.74 PSNR: 20.99 MAXDIFF:  171 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-snow-ll b/tests/ref/fate/vsynth1-snow-ll
index fdc5046..1636af5 100644
--- a/tests/ref/fate/vsynth1-snow-ll
+++ b/tests/ref/fate/vsynth1-snow-ll
@@ -1,4 +1,4 @@
-6d29e8c06a645cdee45073c4f3d0004e *tests/data/fate/vsynth1-snow-ll.avi
-3419980 tests/data/fate/vsynth1-snow-ll.avi
+bdc7a025cd306f3da0d377b06bbe909b *tests/data/fate/vsynth1-snow-ll.avi
+3419968 tests/data/fate/vsynth1-snow-ll.avi
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-snow-ll.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-v210 b/tests/ref/fate/vsynth1-v210
index 5248676..defd2f6 100644
--- a/tests/ref/fate/vsynth1-v210
+++ b/tests/ref/fate/vsynth1-v210
@@ -1,4 +1,4 @@
-dd6c870a2a52c9e75ce61c3670e710e7 *tests/data/fate/vsynth1-v210.avi
-14752460 tests/data/fate/vsynth1-v210.avi
+054d7e903fb4d9e68700c56b93d45916 *tests/data/fate/vsynth1-v210.avi
+14752448 tests/data/fate/vsynth1-v210.avi
 50973792d3f1abe04a51ee0121f077f2 *tests/data/fate/vsynth1-v210.out.rawvideo
 stddev:    1.85 PSNR: 42.78 MAXDIFF:   29 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-wmv1 b/tests/ref/fate/vsynth1-wmv1
index d487e4e..78bd0f0 100644
--- a/tests/ref/fate/vsynth1-wmv1
+++ b/tests/ref/fate/vsynth1-wmv1
@@ -1,4 +1,4 @@
-4f3461315776e5118866fa3819cff9b6 *tests/data/fate/vsynth1-wmv1.avi
-626908 tests/data/fate/vsynth1-wmv1.avi
+5f896b2c7d6a0906f5252a5088fbc64a *tests/data/fate/vsynth1-wmv1.avi
+626896 tests/data/fate/vsynth1-wmv1.avi
 5182edba5b5e0354b39ce4f3604b62da *tests/data/fate/vsynth1-wmv1.out.rawvideo
 stddev:    7.97 PSNR: 30.09 MAXDIFF:  110 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-wmv2 b/tests/ref/fate/vsynth1-wmv2
index 14304dd..82efc62 100644
--- a/tests/ref/fate/vsynth1-wmv2
+++ b/tests/ref/fate/vsynth1-wmv2
@@ -1,4 +1,4 @@
-13efda9d3811345aadc0632fc9a9332b *tests/data/fate/vsynth1-wmv2.avi
-659852 tests/data/fate/vsynth1-wmv2.avi
+fc0796c6c49a18034cef008d61c0d964 *tests/data/fate/vsynth1-wmv2.avi
+659840 tests/data/fate/vsynth1-wmv2.avi
 5182edba5b5e0354b39ce4f3604b62da *tests/data/fate/vsynth1-wmv2.out.rawvideo
 stddev:    7.97 PSNR: 30.09 MAXDIFF:  110 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth1-yuv b/tests/ref/fate/vsynth1-yuv
index 927a64a..3db5ab0 100644
--- a/tests/ref/fate/vsynth1-yuv
+++ b/tests/ref/fate/vsynth1-yuv
@@ -1,4 +1,4 @@
-aa6b9e862aebcf8902a6d770e7729d59 *tests/data/fate/vsynth1-yuv.avi
-7610060 tests/data/fate/vsynth1-yuv.avi
+a9c708ba20f5c562fb1c89f6aa841c8c *tests/data/fate/vsynth1-yuv.avi
+7610048 tests/data/fate/vsynth1-yuv.avi
 c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-yuv.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-asv1 b/tests/ref/fate/vsynth2-asv1
index 702244e..282435b 100644
--- a/tests/ref/fate/vsynth2-asv1
+++ b/tests/ref/fate/vsynth2-asv1
@@ -1,4 +1,4 @@
-4eb34d2de25f67a2706456e999338fe9 *tests/data/fate/vsynth2-asv1.avi
-832512 tests/data/fate/vsynth2-asv1.avi
+ae8d79e0e421138a9a67a148a42c26c5 *tests/data/fate/vsynth2-asv1.avi
+832500 tests/data/fate/vsynth2-asv1.avi
 c96ff7fd17c52f99ddb7922a4cb9168f *tests/data/fate/vsynth2-asv1.out.rawvideo
 stddev:   10.47 PSNR: 27.73 MAXDIFF:   98 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-asv2 b/tests/ref/fate/vsynth2-asv2
index 8f6f617..8942862 100644
--- a/tests/ref/fate/vsynth2-asv2
+++ b/tests/ref/fate/vsynth2-asv2
@@ -1,4 +1,4 @@
-9649a4b68fb1107bad13e8a7574cc72d *tests/data/fate/vsynth2-asv2.avi
-789072 tests/data/fate/vsynth2-asv2.avi
+ccf6762758395eee9a29ef7a4ef3cd58 *tests/data/fate/vsynth2-asv2.avi
+789060 tests/data/fate/vsynth2-asv2.avi
 74a78015b64b2cf8cb9da2e44f508a69 *tests/data/fate/vsynth2-asv2.out.rawvideo
 stddev:   10.28 PSNR: 27.89 MAXDIFF:   95 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-cljr b/tests/ref/fate/vsynth2-cljr
index 91ce30c..39c74c3 100644
--- a/tests/ref/fate/vsynth2-cljr
+++ b/tests/ref/fate/vsynth2-cljr
@@ -1,4 +1,4 @@
-416ddcf73d2d993456f3c49f3eed4f1a *tests/data/fate/vsynth2-cljr.avi
-5075660 tests/data/fate/vsynth2-cljr.avi
+5745ff1d80a6f454ae448dcf0bce50e0 *tests/data/fate/vsynth2-cljr.avi
+5075648 tests/data/fate/vsynth2-cljr.avi
 cfe7802bf34aafed7df5dcaa5126ef23 *tests/data/fate/vsynth2-cljr.out.rawvideo
 stddev:    3.69 PSNR: 36.78 MAXDIFF:   22 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-ffv1 b/tests/ref/fate/vsynth2-ffv1
index 0a6b184..888e843 100644
--- a/tests/ref/fate/vsynth2-ffv1
+++ b/tests/ref/fate/vsynth2-ffv1
@@ -1,4 +1,4 @@
-d72b0960e162d4998b9acbabb07e99ab *tests/data/fate/vsynth2-ffv1.avi
-3525804 tests/data/fate/vsynth2-ffv1.avi
+3a757276e299bf88c30e06dfb53f1c99 *tests/data/fate/vsynth2-ffv1.avi
+3525792 tests/data/fate/vsynth2-ffv1.avi
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-ffv1.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-ffvhuff b/tests/ref/fate/vsynth2-ffvhuff
index 1b279aa..8daed2b 100644
--- a/tests/ref/fate/vsynth2-ffvhuff
+++ b/tests/ref/fate/vsynth2-ffvhuff
@@ -1,4 +1,4 @@
-d31aab445b24f738df45fdd7479d6dd7 *tests/data/fate/vsynth2-ffvhuff.avi
-4988056 tests/data/fate/vsynth2-ffvhuff.avi
+f6a213ef136012a3d189d09468d80dd3 *tests/data/fate/vsynth2-ffvhuff.avi
+4988044 tests/data/fate/vsynth2-ffvhuff.avi
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-ffvhuff.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-h261 b/tests/ref/fate/vsynth2-h261
index 908e670..71ea191 100644
--- a/tests/ref/fate/vsynth2-h261
+++ b/tests/ref/fate/vsynth2-h261
@@ -1,4 +1,4 @@
-dfd005d4c9030a0dc889c828a6408b9c *tests/data/fate/vsynth2-h261.avi
-191086 tests/data/fate/vsynth2-h261.avi
+921e06dffd04667d336449c7cd1c6589 *tests/data/fate/vsynth2-h261.avi
+191074 tests/data/fate/vsynth2-h261.avi
 db7ceff174823b98834faa2320ca89ac *tests/data/fate/vsynth2-h261.out.rawvideo
 stddev:    6.37 PSNR: 32.03 MAXDIFF:   77 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-h263 b/tests/ref/fate/vsynth2-h263
index 46169d7..b2ce370 100644
--- a/tests/ref/fate/vsynth2-h263
+++ b/tests/ref/fate/vsynth2-h263
@@ -1,4 +1,4 @@
-9a368687ab34c48079f11a202839a6bc *tests/data/fate/vsynth2-h263.avi
-160106 tests/data/fate/vsynth2-h263.avi
+329c0318b8727d66946ec729c6e960fc *tests/data/fate/vsynth2-h263.avi
+160094 tests/data/fate/vsynth2-h263.avi
 61213b91b359697ebcefb9e0a53ac54a *tests/data/fate/vsynth2-h263.out.rawvideo
 stddev:    5.43 PSNR: 33.42 MAXDIFF:   77 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-h263-obmc b/tests/ref/fate/vsynth2-h263-obmc
index 32c2341..67fd2fd 100644
--- a/tests/ref/fate/vsynth2-h263-obmc
+++ b/tests/ref/fate/vsynth2-h263-obmc
@@ -1,4 +1,4 @@
-0c84ee18c2261070ffc91b5d606094ae *tests/data/fate/vsynth2-h263-obmc.avi
-154728 tests/data/fate/vsynth2-h263-obmc.avi
+3abbe86e18ef9d407cc3817dd31ebeba *tests/data/fate/vsynth2-h263-obmc.avi
+154716 tests/data/fate/vsynth2-h263-obmc.avi
 6f326547cf1cbd95a8c0a5ddce9eb71a *tests/data/fate/vsynth2-h263-obmc.out.rawvideo
 stddev:    5.39 PSNR: 33.49 MAXDIFF:   82 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-h263p b/tests/ref/fate/vsynth2-h263p
index 6e45957..826dcd1 100644
--- a/tests/ref/fate/vsynth2-h263p
+++ b/tests/ref/fate/vsynth2-h263p
@@ -1,4 +1,4 @@
-c7644d40e9f40bbd98e5a978f9f94bb4 *tests/data/fate/vsynth2-h263p.avi
-868018 tests/data/fate/vsynth2-h263p.avi
+865ca965ab4fdfe225db7de3d23b4ad8 *tests/data/fate/vsynth2-h263p.avi
+868006 tests/data/fate/vsynth2-h263p.avi
 4b0ee791f280029dc03c528f76f195d4 *tests/data/fate/vsynth2-h263p.out.rawvideo
 stddev:    1.91 PSNR: 42.50 MAXDIFF:   19 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-huffyuv b/tests/ref/fate/vsynth2-huffyuv
index a1c3c22..7d062dd 100644
--- a/tests/ref/fate/vsynth2-huffyuv
+++ b/tests/ref/fate/vsynth2-huffyuv
@@ -1,4 +1,4 @@
-56cd44907a48990e06bd065e189ff461 *tests/data/fate/vsynth2-huffyuv.avi
-6455232 tests/data/fate/vsynth2-huffyuv.avi
+30d509aca4a7298cf7667581a5e37671 *tests/data/fate/vsynth2-huffyuv.avi
+6455220 tests/data/fate/vsynth2-huffyuv.avi
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-huffyuv.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-jpegls b/tests/ref/fate/vsynth2-jpegls
index 7f17391..75ad403 100644
--- a/tests/ref/fate/vsynth2-jpegls
+++ b/tests/ref/fate/vsynth2-jpegls
@@ -1,4 +1,4 @@
-8a94dc94b6df8bdde9a639246351d816 *tests/data/fate/vsynth2-jpegls.avi
-8334630 tests/data/fate/vsynth2-jpegls.avi
+f34315ed0e30cf4d94dd21ff1d4cea1b *tests/data/fate/vsynth2-jpegls.avi
+8334618 tests/data/fate/vsynth2-jpegls.avi
 592b3321994e26a990deb3a0a1415de9 *tests/data/fate/vsynth2-jpegls.out.rawvideo
 stddev:    0.65 PSNR: 51.84 MAXDIFF:   14 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-ljpeg b/tests/ref/fate/vsynth2-ljpeg
index 529b790..fa2f978 100644
--- a/tests/ref/fate/vsynth2-ljpeg
+++ b/tests/ref/fate/vsynth2-ljpeg
@@ -1,4 +1,4 @@
-554a4a6a5a9058c588f8bf2de405bc70 *tests/data/fate/vsynth2-ljpeg.avi
-4766914 tests/data/fate/vsynth2-ljpeg.avi
+db9fd56e154b1056c9443a82a96db6f5 *tests/data/fate/vsynth2-ljpeg.avi
+4766902 tests/data/fate/vsynth2-ljpeg.avi
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-ljpeg.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mjpeg b/tests/ref/fate/vsynth2-mjpeg
index e7649ff..981d01b 100644
--- a/tests/ref/fate/vsynth2-mjpeg
+++ b/tests/ref/fate/vsynth2-mjpeg
@@ -1,4 +1,4 @@
-89df32b46c977fb4cb140ec6c489dd76 *tests/data/fate/vsynth2-mjpeg.avi
-673224 tests/data/fate/vsynth2-mjpeg.avi
+ba05f4fad7f34a96c77964e8cdf9d5c0 *tests/data/fate/vsynth2-mjpeg.avi
+673212 tests/data/fate/vsynth2-mjpeg.avi
 a96a4e15ffcb13e44360df642d049496 *tests/data/fate/vsynth2-mjpeg.out.rawvideo
 stddev:    4.32 PSNR: 35.40 MAXDIFF:   49 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-adap b/tests/ref/fate/vsynth2-mpeg4-adap
index d2f3bd1..fb4c206 100644
--- a/tests/ref/fate/vsynth2-mpeg4-adap
+++ b/tests/ref/fate/vsynth2-mpeg4-adap
@@ -1,4 +1,4 @@
-547e1849dcf910935ff6383ca49e5706 *tests/data/fate/vsynth2-mpeg4-adap.avi
-198510 tests/data/fate/vsynth2-mpeg4-adap.avi
+76c8962b06b7a0d748bd7eb3f6fc0e18 *tests/data/fate/vsynth2-mpeg4-adap.avi
+198498 tests/data/fate/vsynth2-mpeg4-adap.avi
 4affb83f6adc94f31024b4f9e0168945 *tests/data/fate/vsynth2-mpeg4-adap.out.rawvideo
 stddev:    3.75 PSNR: 36.65 MAXDIFF:   71 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-adv b/tests/ref/fate/vsynth2-mpeg4-adv
index 6d7d507..b3bf264 100644
--- a/tests/ref/fate/vsynth2-mpeg4-adv
+++ b/tests/ref/fate/vsynth2-mpeg4-adv
@@ -1,4 +1,4 @@
-dee7be19486a76d96c88d18eefba8f86 *tests/data/fate/vsynth2-mpeg4-adv.avi
-141546 tests/data/fate/vsynth2-mpeg4-adv.avi
+1875ae5a45936c08778c4430a22e87eb *tests/data/fate/vsynth2-mpeg4-adv.avi
+141534 tests/data/fate/vsynth2-mpeg4-adv.avi
 3f3a21e9db85a9c0f7022f557a5374c1 *tests/data/fate/vsynth2-mpeg4-adv.out.rawvideo
 stddev:    4.94 PSNR: 34.25 MAXDIFF:   69 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-error b/tests/ref/fate/vsynth2-mpeg4-error
index a3f4453..35dd03d 100644
--- a/tests/ref/fate/vsynth2-mpeg4-error
+++ b/tests/ref/fate/vsynth2-mpeg4-error
@@ -1,4 +1,4 @@
-90e65096aa9ebafa3fe3f44a5a47cdc4 *tests/data/fate/vsynth2-mpeg4-error.avi
-176588 tests/data/fate/vsynth2-mpeg4-error.avi
+d3025e5f784efeb2ab9b84f8924eda19 *tests/data/fate/vsynth2-mpeg4-error.avi
+176576 tests/data/fate/vsynth2-mpeg4-error.avi
 96baa9e4c24c837a3ba5abd8dd2cdd30 *tests/data/fate/vsynth2-mpeg4-error.out.rawvideo
 stddev:    8.98 PSNR: 29.06 MAXDIFF:  184 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-nr b/tests/ref/fate/vsynth2-mpeg4-nr
index 752b504..7fdce67 100644
--- a/tests/ref/fate/vsynth2-mpeg4-nr
+++ b/tests/ref/fate/vsynth2-mpeg4-nr
@@ -1,4 +1,4 @@
-c41187c99588fb7229ad330b2f80d28b *tests/data/fate/vsynth2-mpeg4-nr.avi
-155044 tests/data/fate/vsynth2-mpeg4-nr.avi
+75725f3c2a08efa145a2692a20373a21 *tests/data/fate/vsynth2-mpeg4-nr.avi
+155032 tests/data/fate/vsynth2-mpeg4-nr.avi
 f7fc191308679f709405e62271f5c65f *tests/data/fate/vsynth2-mpeg4-nr.out.rawvideo
 stddev:    4.73 PSNR: 34.63 MAXDIFF:   64 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-qpel b/tests/ref/fate/vsynth2-mpeg4-qpel
index 3cba30d..cab264a 100644
--- a/tests/ref/fate/vsynth2-mpeg4-qpel
+++ b/tests/ref/fate/vsynth2-mpeg4-qpel
@@ -1,4 +1,4 @@
-7680d2e7d34399dfdfb8a49cf1e10239 *tests/data/fate/vsynth2-mpeg4-qpel.avi
-163688 tests/data/fate/vsynth2-mpeg4-qpel.avi
+c45101c6c3b681f5d420a938c0689a37 *tests/data/fate/vsynth2-mpeg4-qpel.avi
+163676 tests/data/fate/vsynth2-mpeg4-qpel.avi
 26dc7c78955fa678fbf150e236eb5627 *tests/data/fate/vsynth2-mpeg4-qpel.out.rawvideo
 stddev:    3.97 PSNR: 36.14 MAXDIFF:   54 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-qprd b/tests/ref/fate/vsynth2-mpeg4-qprd
index 87f5e02..1779dd7 100644
--- a/tests/ref/fate/vsynth2-mpeg4-qprd
+++ b/tests/ref/fate/vsynth2-mpeg4-qprd
@@ -1,4 +1,4 @@
-fd5ab0f55dbc959316e32923e86290df *tests/data/fate/vsynth2-mpeg4-qprd.avi
-231458 tests/data/fate/vsynth2-mpeg4-qprd.avi
+81afd85c3ab00b685588e1b61cc3e4b3 *tests/data/fate/vsynth2-mpeg4-qprd.avi
+231446 tests/data/fate/vsynth2-mpeg4-qprd.avi
 de8a883865e2dff7a51f66da6c48df48 *tests/data/fate/vsynth2-mpeg4-qprd.out.rawvideo
 stddev:    3.71 PSNR: 36.72 MAXDIFF:   61 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-rc b/tests/ref/fate/vsynth2-mpeg4-rc
index bdd897b..74e7962 100644
--- a/tests/ref/fate/vsynth2-mpeg4-rc
+++ b/tests/ref/fate/vsynth2-mpeg4-rc
@@ -1,4 +1,4 @@
-c25ede9e268b834a09a63f5136cd1b95 *tests/data/fate/vsynth2-mpeg4-rc.avi
-226332 tests/data/fate/vsynth2-mpeg4-rc.avi
+e3621649079539ec118e8581c54bc2ef *tests/data/fate/vsynth2-mpeg4-rc.avi
+226320 tests/data/fate/vsynth2-mpeg4-rc.avi
 2b34e606af895b62a250de98749a19b0 *tests/data/fate/vsynth2-mpeg4-rc.out.rawvideo
 stddev:    4.23 PSNR: 35.60 MAXDIFF:   85 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-mpeg4-thread b/tests/ref/fate/vsynth2-mpeg4-thread
index e004009..61478a0 100644
--- a/tests/ref/fate/vsynth2-mpeg4-thread
+++ b/tests/ref/fate/vsynth2-mpeg4-thread
@@ -1,4 +1,4 @@
-ba30d10ff70d46e7c5b7fa859ea1faa4 *tests/data/fate/vsynth2-mpeg4-thread.avi
-250140 tests/data/fate/vsynth2-mpeg4-thread.avi
+69b716c9f99c5acb86a744521c32cf72 *tests/data/fate/vsynth2-mpeg4-thread.avi
+250128 tests/data/fate/vsynth2-mpeg4-thread.avi
 5355deb8c7609a3f1ff2173aab1dee70 *tests/data/fate/vsynth2-mpeg4-thread.out.rawvideo
 stddev:    3.69 PSNR: 36.78 MAXDIFF:   65 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-msmpeg4 b/tests/ref/fate/vsynth2-msmpeg4
index c65a9af..a7cc94e 100644
--- a/tests/ref/fate/vsynth2-msmpeg4
+++ b/tests/ref/fate/vsynth2-msmpeg4
@@ -1,4 +1,4 @@
-26dee25a62a66daba4f38ac6bd8f4677 *tests/data/fate/vsynth2-msmpeg4.avi
-127680 tests/data/fate/vsynth2-msmpeg4.avi
+f602d25096c83f166bdab01fa07a34c1 *tests/data/fate/vsynth2-msmpeg4.avi
+127668 tests/data/fate/vsynth2-msmpeg4.avi
 0e1c6e25c71c6a8fa8e506e3d97ca4c9 *tests/data/fate/vsynth2-msmpeg4.out.rawvideo
 stddev:    5.33 PSNR: 33.59 MAXDIFF:   78 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-msmpeg4v2 b/tests/ref/fate/vsynth2-msmpeg4v2
index d2b63d8..542dfe5 100644
--- a/tests/ref/fate/vsynth2-msmpeg4v2
+++ b/tests/ref/fate/vsynth2-msmpeg4v2
@@ -1,4 +1,4 @@
-c09815e40a9d260628e1ebad8b2b3774 *tests/data/fate/vsynth2-msmpeg4v2.avi
-129918 tests/data/fate/vsynth2-msmpeg4v2.avi
+43d6ca9b63993b4603d4f08fa6aaeab3 *tests/data/fate/vsynth2-msmpeg4v2.avi
+129906 tests/data/fate/vsynth2-msmpeg4v2.avi
 8920194f8bf8f9cdd6c65b3df9e1a292 *tests/data/fate/vsynth2-msmpeg4v2.out.rawvideo
 stddev:    5.33 PSNR: 33.59 MAXDIFF:   80 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-rgb b/tests/ref/fate/vsynth2-rgb
index 36ac105..5c9a98e 100644
--- a/tests/ref/fate/vsynth2-rgb
+++ b/tests/ref/fate/vsynth2-rgb
@@ -1,4 +1,4 @@
-f2e9c419023c743bf99aa5b2e55ad233 *tests/data/fate/vsynth2-rgb.avi
-15213260 tests/data/fate/vsynth2-rgb.avi
+01199075994e44f282fbb6a8e3ccc668 *tests/data/fate/vsynth2-rgb.avi
+15213248 tests/data/fate/vsynth2-rgb.avi
 b2418e0e3a9a8619b31219cbcf24dc82 *tests/data/fate/vsynth2-rgb.out.rawvideo
 stddev:    1.26 PSNR: 46.06 MAXDIFF:   13 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-snow b/tests/ref/fate/vsynth2-snow
index 0e78f32..12f3811 100644
--- a/tests/ref/fate/vsynth2-snow
+++ b/tests/ref/fate/vsynth2-snow
@@ -1,4 +1,4 @@
-af651d8ef0a66257ac8b2ef8b229f27b *tests/data/fate/vsynth2-snow.avi
-57700 tests/data/fate/vsynth2-snow.avi
+4b6236e23ae4a52655f2c24c5a09380a *tests/data/fate/vsynth2-snow.avi
+57688 tests/data/fate/vsynth2-snow.avi
 8890189af71a0dd3447c4e8424c9a76b *tests/data/fate/vsynth2-snow.out.rawvideo
 stddev:   10.47 PSNR: 27.72 MAXDIFF:  119 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-snow-hpel b/tests/ref/fate/vsynth2-snow-hpel
index 2194a13..955f1bf 100644
--- a/tests/ref/fate/vsynth2-snow-hpel
+++ b/tests/ref/fate/vsynth2-snow-hpel
@@ -1,4 +1,4 @@
-ac1400b66514aa280300bba6477b4e97 *tests/data/fate/vsynth2-snow-hpel.avi
-61772 tests/data/fate/vsynth2-snow-hpel.avi
+9872032345c33cf8e8fc26ab655be3d3 *tests/data/fate/vsynth2-snow-hpel.avi
+61760 tests/data/fate/vsynth2-snow-hpel.avi
 8680d40905f423999d65b996c4dcb984 *tests/data/fate/vsynth2-snow-hpel.out.rawvideo
 stddev:   10.45 PSNR: 27.74 MAXDIFF:  123 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-snow-ll b/tests/ref/fate/vsynth2-snow-ll
index 2d33b08..9a72549 100644
--- a/tests/ref/fate/vsynth2-snow-ll
+++ b/tests/ref/fate/vsynth2-snow-ll
@@ -1,4 +1,4 @@
-a8fccf278bbb17d37a756ecf11672b09 *tests/data/fate/vsynth2-snow-ll.avi
-2721758 tests/data/fate/vsynth2-snow-ll.avi
+30b40e0bf64f92b23d6f94056c0c6da5 *tests/data/fate/vsynth2-snow-ll.avi
+2721746 tests/data/fate/vsynth2-snow-ll.avi
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-snow-ll.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-v210 b/tests/ref/fate/vsynth2-v210
index 407ad0e..eb80b34 100644
--- a/tests/ref/fate/vsynth2-v210
+++ b/tests/ref/fate/vsynth2-v210
@@ -1,4 +1,4 @@
-db0579bd46e1ba133ff86c0f7cdd761f *tests/data/fate/vsynth2-v210.avi
-14752460 tests/data/fate/vsynth2-v210.avi
+ddc80f41b9e92c26adbe09567a4c7a1d *tests/data/fate/vsynth2-v210.avi
+14752448 tests/data/fate/vsynth2-v210.avi
 a627fb50c8276200fd71383977d87ca3 *tests/data/fate/vsynth2-v210.out.rawvideo
 stddev:    0.34 PSNR: 57.43 MAXDIFF:    6 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-wmv1 b/tests/ref/fate/vsynth2-wmv1
index 4545d42..188b518 100644
--- a/tests/ref/fate/vsynth2-wmv1
+++ b/tests/ref/fate/vsynth2-wmv1
@@ -1,4 +1,4 @@
-1011e26e7d351c96d7bbfe106d831b69 *tests/data/fate/vsynth2-wmv1.avi
-129530 tests/data/fate/vsynth2-wmv1.avi
+73f3b72208ed1e61be60f1412dbf35e2 *tests/data/fate/vsynth2-wmv1.avi
+129518 tests/data/fate/vsynth2-wmv1.avi
 81eee429b665254d19a06607463c0b5e *tests/data/fate/vsynth2-wmv1.out.rawvideo
 stddev:    5.33 PSNR: 33.60 MAXDIFF:   77 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-wmv2 b/tests/ref/fate/vsynth2-wmv2
index a7384ad..043dac9 100644
--- a/tests/ref/fate/vsynth2-wmv2
+++ b/tests/ref/fate/vsynth2-wmv2
@@ -1,4 +1,4 @@
-1f6598e9776ed00aebdc44cc8d48cb7c *tests/data/fate/vsynth2-wmv2.avi
-129860 tests/data/fate/vsynth2-wmv2.avi
+0760abea07c386ab956fa1bb8b14c599 *tests/data/fate/vsynth2-wmv2.avi
+129848 tests/data/fate/vsynth2-wmv2.avi
 81eee429b665254d19a06607463c0b5e *tests/data/fate/vsynth2-wmv2.out.rawvideo
 stddev:    5.33 PSNR: 33.60 MAXDIFF:   77 bytes:  7603200/  7603200
diff --git a/tests/ref/fate/vsynth2-yuv b/tests/ref/fate/vsynth2-yuv
index a2332e0..d79e986 100644
--- a/tests/ref/fate/vsynth2-yuv
+++ b/tests/ref/fate/vsynth2-yuv
@@ -1,4 +1,4 @@
-30a400773ab26f2c83e469198b156f1d *tests/data/fate/vsynth2-yuv.avi
-7610060 tests/data/fate/vsynth2-yuv.avi
+d08219372af7a764c1afbc99a1002fe0 *tests/data/fate/vsynth2-yuv.avi
+7610048 tests/data/fate/vsynth2-yuv.avi
 dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth2-yuv.out.rawvideo
 stddev:    0.00 PSNR:999.99 MAXDIFF:    0 bytes:  7603200/  7603200
diff --git a/tests/ref/lavf/avi b/tests/ref/lavf/avi
index ae85efc..50646aa 100644
--- a/tests/ref/lavf/avi
+++ b/tests/ref/lavf/avi
@@ -1,3 +1,3 @@
-e056e1164236b22fafc8325de8221a58 *./tests/data/lavf/lavf.avi
-330798 ./tests/data/lavf/lavf.avi
+e6319b86a4422a8317124fc4cc693f8c *./tests/data/lavf/lavf.avi
+330786 ./tests/data/lavf/lavf.avi
 ./tests/data/lavf/lavf.avi CRC=0xa79b84dd
diff --git a/tests/ref/seek/asv1_avi b/tests/ref/seek/asv1_avi
index eb6abc2..5873bb1 100644
--- a/tests/ref/seek/asv1_avi
+++ b/tests/ref/seek/asv1_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 14316
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 14316
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 14316
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 14316
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 776852 size: 18256
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 776840 size: 18256
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 305364 size: 16180
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 305352 size: 16180
 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: 595460 size: 17980
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 595448 size: 17980
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 135528 size: 14868
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 135516 size: 14868
 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: 404112 size: 16856
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 404100 size: 16856
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 14316
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 14316
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813408 size: 18296
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 704148 size: 18140
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 704136 size: 18140
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 241776 size: 15736
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 241764 size: 15736
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 14316
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 14316
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813408 size: 18296
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 524500 size: 17548
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 524488 size: 17548
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:  77032 size: 14496
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:  77020 size: 14496
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 14316
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 14316
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813408 size: 18296
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 813396 size: 18296
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 337820 size: 16388
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 337808 size: 16388
 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: 631596 size: 18188
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 631584 size: 18188
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 180224 size: 15168
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 180212 size: 15168
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/asv2_avi b/tests/ref/seek/asv2_avi
index f7b7f69..7d37b7a 100644
--- a/tests/ref/seek/asv2_avi
+++ b/tests/ref/seek/asv2_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 13732
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 13732
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 13732
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 13732
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 736164 size: 17340
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 736152 size: 17340
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 289720 size: 15300
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 289708 size: 15300
 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: 564152 size: 17016
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 564140 size: 17016
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 128576 size: 14052
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 128564 size: 14052
 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: 383256 size: 15896
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 383244 size: 15896
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 13732
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 13732
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770864 size: 17400
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 667028 size: 17172
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 667016 size: 17172
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 229400 size: 14956
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 229388 size: 14956
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 13732
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 13732
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770864 size: 17400
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 496944 size: 16564
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 496932 size: 16564
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:  73188 size: 13664
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:  73176 size: 13664
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5668 size: 13732
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5656 size: 13732
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770864 size: 17400
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 770852 size: 17400
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 320456 size: 15592
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 320444 size: 15592
 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: 598300 size: 17180
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 598288 size: 17180
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171024 size: 14392
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171012 size: 14392
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/ffv1_avi b/tests/ref/seek/ffv1_avi
index 04edb8d..a1272f8 100644
--- a/tests/ref/seek/ffv1_avi
+++ b/tests/ref/seek/ffv1_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 70200
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 70200
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 70200
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 70200
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2485810 size: 74128
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2485798 size: 74128
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1622716 size: 71128
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1622704 size: 71128
 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:2485810 size: 74128
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2485798 size: 74128
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 796840 size: 67971
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 796828 size: 67971
 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:1622716 size: 71128
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1622704 size: 71128
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 70200
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 70200
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374440 size: 75606
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374428 size: 75606
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374440 size: 75606
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374428 size: 75606
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 796840 size: 67971
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 796828 size: 67971
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 70200
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 70200
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374440 size: 75606
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374428 size: 75606
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2485810 size: 74128
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2485798 size: 74128
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 70200
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 70200
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 70200
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 70200
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374440 size: 75606
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:3374428 size: 75606
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1622716 size: 71128
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1622704 size: 71128
 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:2485810 size: 74128
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:2485798 size: 74128
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 796840 size: 67971
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 796828 size: 67971
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/h261_avi b/tests/ref/seek/h261_avi
index d31364f..1789adc 100644
--- a/tests/ref/seek/h261_avi
+++ b/tests/ref/seek/h261_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9645
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9645
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9645
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9645
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126514 size: 11377
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  82072 size: 10322
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  82060 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: 126514 size: 11377
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  44678 size:  9404
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  44666 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:  82072 size: 10322
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  82060 size: 10322
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9645
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9645
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175882 size: 11707
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175882 size: 11707
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  44678 size:  9404
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  44666 size:  9404
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9645
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9645
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175882 size: 11707
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126514 size: 11377
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9645
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9645
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9645
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9645
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175882 size: 11707
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 175870 size: 11707
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  82072 size: 10322
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  82060 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: 126514 size: 11377
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 126502 size: 11377
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  44678 size:  9404
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  44666 size:  9404
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/h263_avi b/tests/ref/seek/h263_avi
index 8b1795c..b92074f 100644
--- a/tests/ref/seek/h263_avi
+++ b/tests/ref/seek/h263_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10381
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10381
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10381
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10381
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103714 size: 12296
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  66804 size: 11128
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  66792 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: 103714 size: 12296
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36450 size: 10090
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36438 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:  66804 size: 11128
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  66792 size: 11128
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10381
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10381
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144558 size: 12731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144558 size: 12731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36450 size: 10090
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36438 size: 10090
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10381
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10381
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144558 size: 12731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103714 size: 12296
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10381
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10381
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10381
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10381
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144558 size: 12731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 144546 size: 12731
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  66804 size: 11128
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  66792 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: 103714 size: 12296
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 103702 size: 12296
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36450 size: 10090
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36438 size: 10090
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/h263p_avi b/tests/ref/seek/h263p_avi
index 51e6952..9d842a6 100644
--- a/tests/ref/seek/h263p_avi
+++ b/tests/ref/seek/h263p_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 36208
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 36208
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 36208
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 36208
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569938 size: 45151
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355988 size: 40907
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355976 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: 569938 size: 45151
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171054 size: 36515
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171042 size: 36515
 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: 355988 size: 40907
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355976 size: 40907
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 36208
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 36208
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804378 size: 46411
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804378 size: 46411
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171054 size: 36515
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171042 size: 36515
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 36208
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 36208
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804378 size: 46411
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569938 size: 45151
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 36208
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 36208
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 36208
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 36208
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804378 size: 46411
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 804366 size: 46411
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355988 size: 40907
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 355976 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: 569938 size: 45151
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 569926 size: 45151
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171054 size: 36515
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 171042 size: 36515
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/huffyuv_avi b/tests/ref/seek/huffyuv_avi
index 8e3cbc1..69a37f5 100644
--- a/tests/ref/seek/huffyuv_avi
+++ b/tests/ref/seek/huffyuv_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5736 size:129760
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5724 size:129760
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5736 size:129760
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5724 size:129760
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:6069184 size:128520
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:6069172 size:128520
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2579624 size:129192
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:2579612 size:129192
 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:4778240 size:129424
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:4778228 size:129424
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1160260 size:128504
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1160248 size:128504
 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:3355296 size:129424
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3355284 size:129424
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5736 size:129760
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5724 size:129760
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326136 size:128288
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326124 size:128288
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:5554008 size:129016
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:5553996 size:129016
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2062504 size:129204
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2062492 size:129204
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5736 size:129760
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5724 size:129760
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326136 size:128288
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326124 size:128288
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4260872 size:129280
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:4260860 size:129280
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 646920 size:128204
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 646908 size:128204
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5736 size:129760
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5724 size:129760
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326136 size:128288
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:6326124 size:128288
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2838080 size:129268
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2838068 size:129268
 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:5037036 size:129284
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:5037024 size:129284
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1546184 size:128860
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1546172 size:128860
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/jpegls_avi b/tests/ref/seek/jpegls_avi
index b95ec5a..3c0da21 100644
--- a/tests/ref/seek/jpegls_avi
+++ b/tests/ref/seek/jpegls_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:164074
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:164074
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:164074
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:164074
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7804130 size:176295
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7804118 size:176295
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3172792 size:164643
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3172780 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:6052986 size:174097
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:6052974 size:174097
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1402356 size:157283
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1402344 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:4170260 size:168401
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:4170248 size:168401
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:164074
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:164074
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157028 size:176793
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157016 size:176793
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:7101766 size:175326
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:7101754 size:175326
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2519272 size:162522
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2519260 size:162522
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:164074
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:164074
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157028 size:176793
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157016 size:176793
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5360830 size:172183
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5360818 size:172183
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 779846 size:154579
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 779834 size:154579
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:164074
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:164074
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157028 size:176793
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:8157016 size:176793
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3502840 size:166017
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3502828 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:6401464 size:174815
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:6401452 size:174815
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1876428 size:159659
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1876416 size:159659
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/lavf_avi b/tests/ref/seek/lavf_avi
index 2e09ad1..0cabe12 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:   9908 size: 27867
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   9896 size: 27867
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   9908 size: 27867
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   9896 size: 27867
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301466 size: 27864
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301466 size: 27864
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 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: 329556 size:   209
+ret: 0         st: 1 flags:1 dts: 0.992653 pts: 0.992653 pos: 329544 size:   209
 ret: 0         st:-1 flags:0  ts: 0.365002
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 156166 size: 27955
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 156154 size: 27955
 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: 301466 size: 27864
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
 ret: 0         st: 1 flags:0  ts:-0.052245
-ret: 0         st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos:  37784 size:   208
+ret: 0         st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos:  37772 size:   208
 ret: 0         st: 1 flags:1  ts: 2.847347
-ret: 0         st: 1 flags:1 dts: 0.992653 pts: 0.992653 pos: 329556 size:   209
+ret: 0         st: 1 flags:1 dts: 0.992653 pts: 0.992653 pos: 329544 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.480000 pts: 0.480000 pos: 156166 size: 27955
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 156154 size: 27955
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   9908 size: 27867
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   9896 size: 27867
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301466 size: 27864
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 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:  92800 size:   209
+ret: 0         st: 1 flags:1 dts: 0.208980 pts: 0.208980 pos:  92788 size:   209
 ret: 0         st:-1 flags:0  ts:-0.904994
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   9908 size: 27867
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   9896 size: 27867
 ret: 0         st:-1 flags:1  ts: 1.989173
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301466 size: 27864
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 size: 27864
 ret: 0         st: 0 flags:0  ts: 0.880000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301466 size: 27864
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 301454 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: 329556 size:   209
+ret: 0         st: 1 flags:1 dts: 0.992653 pts: 0.992653 pos: 329544 size:   209
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 156166 size: 27955
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 156154 size: 27955
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/ljpeg_avi b/tests/ref/seek/ljpeg_avi
index 76442fe..92264c9 100644
--- a/tests/ref/seek/ljpeg_avi
+++ b/tests/ref/seek/ljpeg_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 96069
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 96069
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 96069
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 96069
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:4481876 size: 94870
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:4481864 size: 94870
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:1902330 size: 95465
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:1902318 size: 95465
 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:3527736 size: 95724
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:3527724 size: 95724
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 854956 size: 94635
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 854944 size: 94635
 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:2475578 size: 95649
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:2475566 size: 95649
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 96069
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 96069
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671510 size: 94595
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671498 size: 94595
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:4101350 size: 95353
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:4101338 size: 95353
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1520296 size: 95410
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:1520284 size: 95410
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 96069
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 96069
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671510 size: 94595
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671498 size: 94595
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:3145126 size: 95587
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:3145114 size: 95587
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 477238 size: 94261
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 477226 size: 94261
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 96069
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 96069
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671510 size: 94595
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:4671498 size: 94595
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2093314 size: 95528
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:2093302 size: 95528
 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:3719138 size: 95615
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:3719126 size: 95615
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1139250 size: 95032
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1139238 size: 95032
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mjpeg_avi b/tests/ref/seek/mjpeg_avi
index b0f975b..59db09a 100644
--- a/tests/ref/seek/mjpeg_avi
+++ b/tests/ref/seek/mjpeg_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 12096
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 12096
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 12096
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 12096
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 627866 size: 14811
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos: 627854 size: 14811
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 247500 size: 12959
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos: 247488 size: 12959
 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: 480770 size: 14528
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos: 480758 size: 14528
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 111012 size: 11927
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos: 111000 size: 11927
 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: 326684 size: 13489
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos: 326672 size: 13489
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 12096
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 12096
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657534 size: 14881
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657522 size: 14881
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 568664 size: 14746
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos: 568652 size: 14746
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 196428 size: 12719
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos: 196416 size: 12719
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 12096
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 12096
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657534 size: 14881
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657522 size: 14881
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 423494 size: 14119
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos: 423482 size: 14119
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:  63872 size: 11714
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:  63860 size: 11714
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 12096
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 12096
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657534 size: 14881
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos: 657522 size: 14881
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 273520 size: 13131
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos: 273508 size: 13131
 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: 509938 size: 14597
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos: 509926 size: 14597
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146970 size: 12168
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146958 size: 12168
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_adap_avi b/tests/ref/seek/mpeg4_adap_avi
index 8397b41..87b80cc 100644
--- a/tests/ref/seek/mpeg4_adap_avi
+++ b/tests/ref/seek/mpeg4_adap_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size:  6855
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size:  6855
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size:  6855
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size:  6855
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174456 size: 16883
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174444 size: 16883
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  98228 size: 17063
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  98216 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: 135598 size: 17525
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 135586 size: 17525
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  59454 size: 17261
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  59442 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:  98228 size: 17063
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  98216 size: 17063
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size:  6855
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size:  6855
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174456 size: 16883
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174444 size: 16883
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174456 size: 16883
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174444 size: 16883
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  59454 size: 17261
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  59442 size: 17261
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size:  6855
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size:  6855
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174456 size: 16883
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174444 size: 16883
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 135598 size: 17525
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 135586 size: 17525
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size:  6855
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size:  6855
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size:  6855
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size:  6855
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174456 size: 16883
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 174444 size: 16883
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  98228 size: 17063
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  98216 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: 135598 size: 17525
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 135586 size: 17525
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  98228 size: 17063
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  98216 size: 17063
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_adv_avi b/tests/ref/seek/mpeg4_adv_avi
index 2e66b77..6765864 100644
--- a/tests/ref/seek/mpeg4_adv_avi
+++ b/tests/ref/seek/mpeg4_adv_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8653
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8653
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8653
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8653
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  91730 size: 11013
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  91718 size: 11013
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  59504 size:  9815
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  59492 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:  91730 size: 11013
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  91718 size: 11013
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  31944 size:  8753
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  31932 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:  59504 size:  9815
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  59492 size:  9815
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8653
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8653
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127624 size: 11279
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127624 size: 11279
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  31944 size:  8753
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  31932 size:  8753
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8653
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8653
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127624 size: 11279
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  91730 size: 11013
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  91718 size: 11013
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8653
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8653
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8653
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8653
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127624 size: 11279
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 127612 size: 11279
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  59504 size:  9815
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  59492 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:  91730 size: 11013
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  91718 size: 11013
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  31944 size:  8753
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  31932 size:  8753
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_error_avi b/tests/ref/seek/mpeg4_error_avi
index 3c6fa21..322bcab 100644
--- a/tests/ref/seek/mpeg4_error_avi
+++ b/tests/ref/seek/mpeg4_error_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9564
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9564
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9564
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9564
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113142 size: 12795
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  71660 size: 11680
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  71648 size: 11680
 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: 113142 size: 12795
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36782 size: 10310
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36770 size: 10310
 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:  71660 size: 11680
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  71648 size: 11680
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9564
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9564
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159370 size: 13895
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159370 size: 13895
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36782 size: 10310
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36770 size: 10310
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9564
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9564
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159370 size: 13895
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113142 size: 12795
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9564
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9564
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9564
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9564
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159370 size: 13895
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 159358 size: 13895
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  71660 size: 11680
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  71648 size: 11680
 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: 113142 size: 12795
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 113130 size: 12795
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36782 size: 10310
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  36770 size: 10310
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_nr_avi b/tests/ref/seek/mpeg4_nr_avi
index c9af36f..5273ae1 100644
--- a/tests/ref/seek/mpeg4_nr_avi
+++ b/tests/ref/seek/mpeg4_nr_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10673
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10673
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10673
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10673
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100640 size: 12464
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  65480 size: 11181
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  65468 size: 11181
 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: 100640 size: 12464
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  35312 size:  9987
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  35300 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:  65480 size: 11181
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  65468 size: 11181
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10673
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10673
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139424 size: 12911
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139424 size: 12911
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  35312 size:  9987
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  35300 size:  9987
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10673
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10673
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139424 size: 12911
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100640 size: 12464
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10673
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10673
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 10673
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 10673
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139424 size: 12911
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 139412 size: 12911
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  65480 size: 11181
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  65468 size: 11181
 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: 100640 size: 12464
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos: 100628 size: 12464
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  35312 size:  9987
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  35300 size:  9987
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_qpel_avi b/tests/ref/seek/mpeg4_qpel_avi
index 1bb1504..195fb30 100644
--- a/tests/ref/seek/mpeg4_qpel_avi
+++ b/tests/ref/seek/mpeg4_qpel_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 11942
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 11942
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 11942
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 11942
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141530 size: 15562
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141518 size: 15562
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  64116 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  64104 size: 13382
 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: 100368 size: 15057
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 100356 size: 15057
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  32818 size: 11813
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  32806 size: 11813
 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:  64116 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  64104 size: 13382
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 11942
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 11942
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141530 size: 15562
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141518 size: 15562
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141530 size: 15562
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141518 size: 15562
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  32818 size: 11813
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  32806 size: 11813
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 11942
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 11942
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141530 size: 15562
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141518 size: 15562
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 100368 size: 15057
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 100356 size: 15057
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 11942
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 11942
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 11942
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 11942
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141530 size: 15562
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 141518 size: 15562
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  64116 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  64104 size: 13382
 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: 100368 size: 15057
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 100356 size: 15057
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  64116 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos:  64104 size: 13382
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_qprd_avi b/tests/ref/seek/mpeg4_qprd_avi
index 70374df..4c3c7f5 100644
--- a/tests/ref/seek/mpeg4_qprd_avi
+++ b/tests/ref/seek/mpeg4_qprd_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14873
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14873
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14873
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14873
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211032 size: 14638
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211020 size: 14638
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 150666 size: 14502
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 150654 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.360000 pts: NOPTS    pos: 180782 size: 14371
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180770 size: 14371
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  93036 size: 29366
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  93024 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.880000 pts: NOPTS    pos: 150666 size: 14502
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 150654 size: 14502
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14873
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14873
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211032 size: 14638
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211020 size: 14638
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211032 size: 14638
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211020 size: 14638
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  93036 size: 29366
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  93024 size: 29366
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14873
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14873
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211032 size: 14638
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211020 size: 14638
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180782 size: 14371
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180770 size: 14371
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14873
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14873
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14873
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14873
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211032 size: 14638
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 211020 size: 14638
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 150666 size: 14502
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 150654 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.360000 pts: NOPTS    pos: 180782 size: 14371
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180770 size: 14371
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 150666 size: 14502
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 150654 size: 14502
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_rc_avi b/tests/ref/seek/mpeg4_rc_avi
index dc703d7..5c96c78 100644
--- a/tests/ref/seek/mpeg4_rc_avi
+++ b/tests/ref/seek/mpeg4_rc_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 15766
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 15766
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 15766
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 15766
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207968 size: 13826
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207956 size: 13826
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 153812 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 153800 size: 13382
 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: 180960 size: 13326
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180948 size: 13326
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  94594 size: 32807
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  94582 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: 153812 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 153800 size: 13382
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 15766
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 15766
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207968 size: 13826
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207956 size: 13826
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207968 size: 13826
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207956 size: 13826
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  94594 size: 32807
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  94582 size: 32807
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 15766
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 15766
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207968 size: 13826
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207956 size: 13826
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180960 size: 13326
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180948 size: 13326
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 15766
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 15766
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 15766
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 15766
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207968 size: 13826
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 207956 size: 13826
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 153812 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 153800 size: 13382
 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: 180960 size: 13326
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 180948 size: 13326
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 153812 size: 13382
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 153800 size: 13382
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/mpeg4_thread_avi b/tests/ref/seek/mpeg4_thread_avi
index 8c97827..8c4f663 100644
--- a/tests/ref/seek/mpeg4_thread_avi
+++ b/tests/ref/seek/mpeg4_thread_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14874
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14874
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14874
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14874
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228222 size: 16324
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228210 size: 16324
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 162162 size: 16475
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 162150 size: 16475
 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: 195332 size: 16136
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 195320 size: 16136
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  97844 size: 33332
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  97832 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: 162162 size: 16475
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 162150 size: 16475
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14874
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14874
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228222 size: 16324
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228210 size: 16324
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228222 size: 16324
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228210 size: 16324
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  97844 size: 33332
+ret: 0         st: 0 flags:1 dts: 0.400000 pts: NOPTS    pos:  97832 size: 33332
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14874
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14874
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228222 size: 16324
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228210 size: 16324
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 195332 size: 16136
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 195320 size: 16136
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14874
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14874
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5660 size: 14874
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: NOPTS    pos:   5648 size: 14874
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228222 size: 16324
+ret: 0         st: 0 flags:1 dts: 1.840000 pts: NOPTS    pos: 228210 size: 16324
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 162162 size: 16475
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 162150 size: 16475
 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: 195332 size: 16136
+ret: 0         st: 0 flags:1 dts: 1.360000 pts: NOPTS    pos: 195320 size: 16136
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 162162 size: 16475
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: NOPTS    pos: 162150 size: 16475
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/msmpeg4_avi b/tests/ref/seek/msmpeg4_avi
index fafd442..323f96a 100644
--- a/tests/ref/seek/msmpeg4_avi
+++ b/tests/ref/seek/msmpeg4_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8637
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8637
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8637
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8637
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  82520 size: 10783
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  82508 size: 10783
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  53858 size:  9624
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  53846 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:  82520 size: 10783
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  82508 size: 10783
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29400 size:  8502
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29388 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:  53858 size:  9624
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  53846 size:  9624
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8637
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8637
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114276 size: 11180
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114276 size: 11180
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29400 size:  8502
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29388 size:  8502
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8637
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8637
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114276 size: 11180
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  82520 size: 10783
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  82508 size: 10783
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8637
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8637
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8637
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8637
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114276 size: 11180
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 114264 size: 11180
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  53858 size:  9624
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  53846 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:  82520 size: 10783
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  82508 size: 10783
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29400 size:  8502
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29388 size:  8502
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/msmpeg4v2_avi b/tests/ref/seek/msmpeg4v2_avi
index 566ade0..177898e 100644
--- a/tests/ref/seek/msmpeg4v2_avi
+++ b/tests/ref/seek/msmpeg4v2_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9003
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9003
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9003
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9003
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83882 size: 11165
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83870 size: 11165
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54790 size: 10010
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54778 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:  83882 size: 11165
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83870 size: 11165
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29782 size:  8869
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29770 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:  54790 size: 10010
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54778 size: 10010
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9003
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9003
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116112 size: 11578
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116112 size: 11578
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29782 size:  8869
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29770 size:  8869
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9003
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9003
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116112 size: 11578
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83882 size: 11165
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83870 size: 11165
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9003
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9003
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  9003
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  9003
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116112 size: 11578
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116100 size: 11578
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54790 size: 10010
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54778 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:  83882 size: 11165
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83870 size: 11165
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29782 size:  8869
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29770 size:  8869
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/rgb_avi b/tests/ref/seek/rgb_avi
index 888032b..91f7260 100644
--- a/tests/ref/seek/rgb_avi
+++ b/tests/ref/seek/rgb_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:304128
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:304128
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:304128
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:304128
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:14300052 size:304128
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:14300040 size:304128
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:6088380 size:304128
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:6088368 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:11258692 size:304128
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:11258680 size:304128
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2742884 size:304128
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2742872 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:7913196 size:304128
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:7913184 size:304128
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:304128
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:304128
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908324 size:304128
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908312 size:304128
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:13083508 size:304128
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:13083496 size:304128
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4871836 size:304128
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4871824 size:304128
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:304128
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:304128
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908324 size:304128
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908312 size:304128
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:10042148 size:304128
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:10042136 size:304128
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1526340 size:304128
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1526328 size:304128
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:304128
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:304128
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908324 size:304128
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:14908312 size:304128
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6696652 size:304128
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6696640 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:11866964 size:304128
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:11866952 size:304128
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3655292 size:304128
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3655280 size:304128
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/snow_avi b/tests/ref/seek/snow_avi
index 39f8ac8..d8f5aae 100644
--- a/tests/ref/seek/snow_avi
+++ b/tests/ref/seek/snow_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  3035
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  3035
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  3035
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  3035
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  39726 size:  3640
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  39714 size:  3640
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  27446 size:  3494
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  27434 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:  39726 size:  3640
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  39714 size:  3640
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  16136 size:  3244
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  16124 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:  27446 size:  3494
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  27434 size:  3494
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  3035
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  3035
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52616 size:  3582
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52604 size:  3582
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52616 size:  3582
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52604 size:  3582
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  16136 size:  3244
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  16124 size:  3244
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  3035
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  3035
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52616 size:  3582
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52604 size:  3582
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  39726 size:  3640
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  39714 size:  3640
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  3035
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  3035
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  3035
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  3035
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52616 size:  3582
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:  52604 size:  3582
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  27446 size:  3494
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  27434 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:  39726 size:  3640
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  39714 size:  3640
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  16136 size:  3244
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  16124 size:  3244
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/snow_ll_avi b/tests/ref/seek/snow_ll_avi
index 5eb0ba0..95a4a79 100644
--- a/tests/ref/seek/snow_ll_avi
+++ b/tests/ref/seek/snow_ll_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 72476
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 72476
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 72476
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 72476
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902800 size: 78837
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902788 size: 78837
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1239102 size: 74994
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1239090 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:1902800 size: 78837
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902788 size: 78837
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605640 size: 71059
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605628 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:1239102 size: 74994
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1239090 size: 74994
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 72476
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 72476
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585626 size: 79731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585614 size: 79731
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585626 size: 79731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585614 size: 79731
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605640 size: 71059
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605628 size: 71059
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 72476
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 72476
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585626 size: 79731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585614 size: 79731
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902800 size: 78837
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902788 size: 78837
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 72476
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 72476
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size: 72476
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size: 72476
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585626 size: 79731
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos:2585614 size: 79731
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1239102 size: 74994
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:1239090 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:1902800 size: 78837
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:1902788 size: 78837
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605640 size: 71059
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 605628 size: 71059
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/wmv1_avi b/tests/ref/seek/wmv1_avi
index 8739c96..85465b3 100644
--- a/tests/ref/seek/wmv1_avi
+++ b/tests/ref/seek/wmv1_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8990
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8990
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8990
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8990
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83754 size: 11099
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83742 size: 11099
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54770 size:  9931
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54758 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:  83754 size: 11099
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83742 size: 11099
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29806 size:  8796
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29794 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:  54770 size:  9931
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54758 size:  9931
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8990
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8990
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115824 size: 11487
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115824 size: 11487
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29806 size:  8796
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29794 size:  8796
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8990
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8990
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115824 size: 11487
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83754 size: 11099
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83742 size: 11099
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8990
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8990
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:  8990
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:  8990
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115824 size: 11487
+ret: 0         st: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 115812 size: 11487
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54770 size:  9931
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54758 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:  83754 size: 11099
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83742 size: 11099
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29806 size:  8796
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29794 size:  8796
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/wmv2_avi b/tests/ref/seek/wmv2_avi
index ca01a39..8ed257e 100644
--- a/tests/ref/seek/wmv2_avi
+++ b/tests/ref/seek/wmv2_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5664 size:  8917
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5652 size:  8917
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5664 size:  8917
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5652 size:  8917
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83802 size: 11170
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83790 size: 11170
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54584 size:  9989
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54572 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:  83802 size: 11170
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83790 size: 11170
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29644 size:  8839
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29632 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:  54584 size:  9989
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54572 size:  9989
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5664 size:  8917
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5652 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: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116058 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: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116058 size: 11554
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29644 size:  8839
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29632 size:  8839
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5664 size:  8917
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5652 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: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116058 size: 11554
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83802 size: 11170
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83790 size: 11170
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5664 size:  8917
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5652 size:  8917
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5664 size:  8917
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5652 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: 0 flags:1 dts: 1.920000 pts: 1.920000 pos: 116058 size: 11554
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54584 size:  9989
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:  54572 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:  83802 size: 11170
+ret: 0         st: 0 flags:1 dts: 1.440000 pts: 1.440000 pos:  83790 size: 11170
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29644 size:  8839
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:  29632 size:  8839
 ret:-1         st:-1 flags:1  ts:-0.645825
diff --git a/tests/ref/seek/yuv_avi b/tests/ref/seek/yuv_avi
index 49c514e..d440761 100644
--- a/tests/ref/seek/yuv_avi
+++ b/tests/ref/seek/yuv_avi
@@ -1,46 +1,46 @@
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:152064
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:152064
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:152064
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:152064
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7153044 size:152064
+ret: 0         st: 0 flags:1 dts: 1.880000 pts: 1.880000 pos:7153032 size:152064
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3047100 size:152064
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3047088 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:5632324 size:152064
+ret: 0         st: 0 flags:1 dts: 1.480000 pts: 1.480000 pos:5632312 size:152064
 ret: 0         st: 0 flags:0  ts: 0.360000
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1374308 size:152064
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1374296 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:3959532 size:152064
+ret: 0         st: 0 flags:1 dts: 1.040000 pts: 1.040000 pos:3959520 size:152064
 ret: 0         st: 0 flags:0  ts:-0.040000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:152064
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:152064
 ret: 0         st: 0 flags:1  ts: 2.840000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457188 size:152064
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457176 size:152064
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:6544756 size:152064
+ret: 0         st: 0 flags:1 dts: 1.720000 pts: 1.720000 pos:6544744 size:152064
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2438812 size:152064
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2438800 size:152064
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:152064
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:152064
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457188 size:152064
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457176 size:152064
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5024036 size:152064
+ret: 0         st: 0 flags:1 dts: 1.320000 pts: 1.320000 pos:5024024 size:152064
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 766020 size:152064
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos: 766008 size:152064
 ret: 0         st: 0 flags:0  ts:-0.920000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5660 size:152064
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5648 size:152064
 ret: 0         st: 0 flags:1  ts: 2.000000
-ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457188 size:152064
+ret: 0         st: 0 flags:1 dts: 1.960000 pts: 1.960000 pos:7457176 size:152064
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3351244 size:152064
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3351232 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:5936468 size:152064
+ret: 0         st: 0 flags:1 dts: 1.560000 pts: 1.560000 pos:5936456 size:152064
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1830524 size:152064
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1830512 size:152064
 ret:-1         st:-1 flags:1  ts:-0.645825



More information about the ffmpeg-cvslog mailing list