[FFmpeg-devel,05/13] avformat/mxfenc: Fix stored width

Submitted by Michael Niedermayer on May 7, 2018, 10:38 a.m.

Details

Message ID 20180507103817.8320-5-michael@niedermayer.cc
State New
Headers show

Commit Message

Michael Niedermayer May 7, 2018, 10:38 a.m.
This fixes the width to have computations matching the height

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/mxfenc.c                          |   3 +-
 .../ref/fate/concat-demuxer-extended-lavf-mxf |   2 +-
 .../fate/concat-demuxer-extended-lavf-mxf_d10 |   2 +-
 .../ref/fate/concat-demuxer-simple1-lavf-mxf  | 242 +++++++++---------
 .../fate/concat-demuxer-simple1-lavf-mxf_d10  | 140 +++++-----
 tests/ref/seek/lavf-mxf                       |  44 ++--
 tests/ref/seek/lavf-mxf_d10                   |  54 ++--
 tests/ref/seek/lavf-mxf_dv25                  |  54 ++--
 tests/ref/seek/lavf-mxf_dvcpro50              |  54 ++--
 tests/ref/seek/lavf-mxf_opatom_audio          |  54 ++--
 10 files changed, 325 insertions(+), 324 deletions(-)

Comments

Tomas Härdin May 8, 2018, 10:37 a.m.
mån 2018-05-07 klockan 12:38 +0200 skrev Michael Niedermayer:
> This fixes the width to have computations matching the height
> 
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/mxfenc.c                          |   3 +-
>  .../ref/fate/concat-demuxer-extended-lavf-mxf |   2 +-
>  .../fate/concat-demuxer-extended-lavf-mxf_d10 |   2 +-
>  .../ref/fate/concat-demuxer-simple1-lavf-mxf  | 242 +++++++++---------
>  .../fate/concat-demuxer-simple1-lavf-mxf_d10  | 140 +++++-----
>  tests/ref/seek/lavf-mxf                       |  44 ++--
>  tests/ref/seek/lavf-mxf_d10                   |  54 ++--
>  tests/ref/seek/lavf-mxf_dv25                  |  54 ++--
>  tests/ref/seek/lavf-mxf_dvcpro50              |  54 ++--
>  tests/ref/seek/lavf-mxf_opatom_audio          |  54 ++--
>  10 files changed, 325 insertions(+), 324 deletions(-)
> 
> diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> index f0fd406493..9140302b81 100644
> --- a/libavformat/mxfenc.c
> +++ b/libavformat/mxfenc.c
> @@ -1131,6 +1131,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
>  {
>      MXFStreamContext *sc = st->priv_data;
>      AVIOContext *pb = s->pb;
> +    int stored_width  = (st->codecpar->width +15)/16*16;
>      int stored_height = (st->codecpar->height+15)/16*16;

Should a muxer really do this kinds of computations? What happens if a
codec comes along that has larger or smaller macroblocks?

>      int display_height;
>      int f1, f2;
> @@ -1143,7 +1144,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
>      mxf_write_generic_desc(s, st, key, desc_size);
>  
>      mxf_write_local_tag(pb, 4, 0x3203);
> -    avio_wb32(pb, st->codecpar->width);
> +    avio_wb32(pb, stored_width);

/Tomas
Michael Niedermayer May 8, 2018, 4:22 p.m.
On Tue, May 08, 2018 at 12:37:08PM +0200, Tomas Härdin wrote:
> mån 2018-05-07 klockan 12:38 +0200 skrev Michael Niedermayer:
> > This fixes the width to have computations matching the height
> > 
> > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavformat/mxfenc.c                          |   3 +-
> >  .../ref/fate/concat-demuxer-extended-lavf-mxf |   2 +-
> >  .../fate/concat-demuxer-extended-lavf-mxf_d10 |   2 +-
> >  .../ref/fate/concat-demuxer-simple1-lavf-mxf  | 242 +++++++++---------
> >  .../fate/concat-demuxer-simple1-lavf-mxf_d10  | 140 +++++-----
> >  tests/ref/seek/lavf-mxf                       |  44 ++--
> >  tests/ref/seek/lavf-mxf_d10                   |  54 ++--
> >  tests/ref/seek/lavf-mxf_dv25                  |  54 ++--
> >  tests/ref/seek/lavf-mxf_dvcpro50              |  54 ++--
> >  tests/ref/seek/lavf-mxf_opatom_audio          |  54 ++--
> >  10 files changed, 325 insertions(+), 324 deletions(-)
> > 
> > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
> > index f0fd406493..9140302b81 100644
> > --- a/libavformat/mxfenc.c
> > +++ b/libavformat/mxfenc.c
> > @@ -1131,6 +1131,7 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
> >  {
> >      MXFStreamContext *sc = st->priv_data;
> >      AVIOContext *pb = s->pb;
> > +    int stored_width  = (st->codecpar->width +15)/16*16;
> >      int stored_height = (st->codecpar->height+15)/16*16;
> 
> Should a muxer really do this kinds of computations? 

The specification lists these fields as "best effort" so litterally
yes, the muxer should do its best to do the computations and fill the
fields.


> What happens if a
> codec comes along that has larger or smaller macroblocks?

In this case we likely will have to check for this in the muxer

will apply

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index f0fd406493..9140302b81 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -1131,6 +1131,7 @@  static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
 {
     MXFStreamContext *sc = st->priv_data;
     AVIOContext *pb = s->pb;
+    int stored_width  = (st->codecpar->width +15)/16*16;
     int stored_height = (st->codecpar->height+15)/16*16;
     int display_height;
     int f1, f2;
@@ -1143,7 +1144,7 @@  static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
     mxf_write_generic_desc(s, st, key, desc_size);
 
     mxf_write_local_tag(pb, 4, 0x3203);
-    avio_wb32(pb, st->codecpar->width);
+    avio_wb32(pb, stored_width);
 
     mxf_write_local_tag(pb, 4, 0x3202);
     avio_wb32(pb, stored_height>>sc->interlaced);
diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf b/tests/ref/fate/concat-demuxer-extended-lavf-mxf
index c47f14faa1..13170c6eaf 100644
--- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf
+++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf
@@ -1 +1 @@ 
-7e53f4c5cb0c9afda2771c9f0c697d9c *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
+7c8c500ea386b41e9025487fb4380f5c *tests/data/fate/concat-demuxer-extended-lavf-mxf.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
index 75d386e3c1..c3c8591c93 100644
--- a/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
+++ b/tests/ref/fate/concat-demuxer-extended-lavf-mxf_d10
@@ -1 +1 @@ 
-44810fc2eeee0072d9d7011b0d2afe59 *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
+d87c3a2394c60046636e43848fa8b4f6 *tests/data/fate/concat-demuxer-extended-lavf-mxf_d10.ffprobe
diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
index 1174a1e183..4f1d12fe26 100644
--- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
+++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf
@@ -1,124 +1,124 @@ 
-video|0|0|0.000000|-1|-0.040000|1|0.040000|N/A|N/A|24801|6144|K_
-audio|1|0|0.000000|0|0.000000|1920|0.040000|N/A|N/A|3840|31232|K_
-video|0|3|0.120000|0|0.000000|1|0.040000|N/A|N/A|16743|35840|__
-audio|1|1920|0.040000|1920|0.040000|1920|0.040000|N/A|N/A|3840|52736|K_
-video|0|1|0.040000|1|0.040000|1|0.040000|N/A|N/A|13812|57344|__
-audio|1|3840|0.080000|3840|0.080000|1920|0.040000|N/A|N/A|3840|71680|K_
-video|0|2|0.080000|2|0.080000|1|0.040000|N/A|N/A|13607|76288|__
-audio|1|5760|0.120000|5760|0.120000|1920|0.040000|N/A|N/A|3840|90112|K_
-video|0|6|0.240000|3|0.120000|1|0.040000|N/A|N/A|16158|94720|__
-audio|1|7680|0.160000|7680|0.160000|1920|0.040000|N/A|N/A|3840|111104|K_
-video|0|4|0.160000|4|0.160000|1|0.040000|N/A|N/A|13943|115712|__
-audio|1|9600|0.200000|9600|0.200000|1920|0.040000|N/A|N/A|3840|130048|K_
-video|0|5|0.200000|5|0.200000|1|0.040000|N/A|N/A|11223|134656|__
-audio|1|11520|0.240000|11520|0.240000|1920|0.040000|N/A|N/A|3840|145920|K_
-video|0|9|0.360000|6|0.240000|1|0.040000|N/A|N/A|20298|150528|__
-audio|1|13440|0.280000|13440|0.280000|1920|0.040000|N/A|N/A|3840|171008|K_
-video|0|7|0.280000|7|0.280000|1|0.040000|N/A|N/A|13341|175616|__
-audio|1|15360|0.320000|15360|0.320000|1920|0.040000|N/A|N/A|3840|189440|K_
-video|0|8|0.320000|8|0.320000|1|0.040000|N/A|N/A|12362|194048|__
-audio|1|17280|0.360000|17280|0.360000|1920|0.040000|N/A|N/A|3840|206848|K_
-video|0|12|0.480000|9|0.360000|1|0.040000|N/A|N/A|24786|211456|K_
-audio|1|19200|0.400000|19200|0.400000|1920|0.040000|N/A|N/A|3840|236544|K_
-video|0|10|0.400000|10|0.400000|1|0.040000|N/A|N/A|13377|241152|__
-audio|1|21120|0.440000|21120|0.440000|1920|0.040000|N/A|N/A|3840|254976|K_
-video|0|11|0.440000|11|0.440000|1|0.040000|N/A|N/A|15624|259584|__
-audio|1|23040|0.480000|23040|0.480000|1920|0.040000|N/A|N/A|3840|275456|K_
-video|0|15|0.600000|12|0.480000|1|0.040000|N/A|N/A|22597|280064|__
-audio|1|24960|0.520000|24960|0.520000|1920|0.040000|N/A|N/A|3840|303104|K_
-video|0|13|0.520000|13|0.520000|1|0.040000|N/A|N/A|15028|307712|__
-audio|1|26880|0.560000|26880|0.560000|1920|0.040000|N/A|N/A|3840|323072|K_
-video|0|14|0.560000|14|0.560000|1|0.040000|N/A|N/A|14014|327680|__
-audio|1|28800|0.600000|28800|0.600000|1920|0.040000|N/A|N/A|3840|342016|K_
-video|0|18|0.720000|15|0.600000|1|0.040000|N/A|N/A|20731|346624|__
-audio|1|30720|0.640000|30720|0.640000|1920|0.040000|N/A|N/A|3840|367616|K_
-video|0|16|0.640000|16|0.640000|1|0.040000|N/A|N/A|11946|372224|__
-audio|1|32640|0.680000|32640|0.680000|1920|0.040000|N/A|N/A|3840|384512|K_
-video|0|17|0.680000|17|0.680000|1|0.040000|N/A|N/A|14464|389120|__
-audio|1|34560|0.720000|34560|0.720000|1920|0.040000|N/A|N/A|3840|403968|K_
-video|0|21|0.840000|18|0.720000|1|0.040000|N/A|N/A|16189|408576|__
-audio|1|36480|0.760000|36480|0.760000|1920|0.040000|N/A|N/A|3840|424960|K_
-video|0|19|0.760000|19|0.760000|1|0.040000|N/A|N/A|10524|429568|__
-audio|1|38400|0.800000|38400|0.800000|1920|0.040000|N/A|N/A|3840|440320|K_
-video|0|20|0.800000|20|0.800000|1|0.040000|N/A|N/A|10599|444928|__
-audio|1|40320|0.840000|40320|0.840000|1920|0.040000|N/A|N/A|3840|455680|K_
-video|0|24|0.960000|21|0.840000|1|0.040000|N/A|N/A|24711|460288|K_
-audio|1|42240|0.880000|42240|0.880000|1920|0.040000|N/A|N/A|3840|485376|K_
-video|0|22|0.880000|22|0.880000|1|0.040000|N/A|N/A|10840|489984|__
-audio|1|44160|0.920000|44160|0.920000|1920|0.040000|N/A|N/A|3840|501248|K_
-video|0|23|0.920000|23|0.920000|1|0.040000|N/A|N/A|13350|505856|__
-audio|1|46080|0.960000|46080|0.960000|1920|0.040000|N/A|N/A|3840|519680|K_
-video|0|17|0.680000|14|0.560000|1|0.040000|N/A|N/A|24786|211456|K_
-audio|1|28800|0.600000|28800|0.600000|1920|0.040000|N/A|N/A|3840|236544|K_
-video|0|15|0.600000|15|0.600000|1|0.040000|N/A|N/A|13377|241152|__
-audio|1|30720|0.640000|30720|0.640000|1920|0.040000|N/A|N/A|3840|254976|K_
-video|0|16|0.640000|16|0.640000|1|0.040000|N/A|N/A|15624|259584|__
-audio|1|32640|0.680000|32640|0.680000|1920|0.040000|N/A|N/A|3840|275456|K_
-video|0|20|0.800000|17|0.680000|1|0.040000|N/A|N/A|22597|280064|__
-audio|1|34560|0.720000|34560|0.720000|1920|0.040000|N/A|N/A|3840|303104|K_
-video|0|18|0.720000|18|0.720000|1|0.040000|N/A|N/A|15028|307712|__
-audio|1|36480|0.760000|36480|0.760000|1920|0.040000|N/A|N/A|3840|323072|K_
-video|0|19|0.760000|19|0.760000|1|0.040000|N/A|N/A|14014|327680|__
-audio|1|38400|0.800000|38400|0.800000|1920|0.040000|N/A|N/A|3840|342016|K_
-video|0|23|0.920000|20|0.800000|1|0.040000|N/A|N/A|20731|346624|__
-audio|1|40320|0.840000|40320|0.840000|1920|0.040000|N/A|N/A|3840|367616|K_
-video|0|21|0.840000|21|0.840000|1|0.040000|N/A|N/A|11946|372224|__
-audio|1|42240|0.880000|42240|0.880000|1920|0.040000|N/A|N/A|3840|384512|K_
-video|0|22|0.880000|22|0.880000|1|0.040000|N/A|N/A|14464|389120|__
-audio|1|44160|0.920000|44160|0.920000|1920|0.040000|N/A|N/A|3840|403968|K_
-video|0|26|1.040000|23|0.920000|1|0.040000|N/A|N/A|16189|408576|__
-audio|1|46080|0.960000|46080|0.960000|1920|0.040000|N/A|N/A|3840|424960|K_
-video|0|24|0.960000|24|0.960000|1|0.040000|N/A|N/A|10524|429568|__
-audio|1|48000|1.000000|48000|1.000000|1920|0.040000|N/A|N/A|3840|440320|K_
-video|0|25|1.000000|25|1.000000|1|0.040000|N/A|N/A|10599|444928|__
-audio|1|49920|1.040000|49920|1.040000|1920|0.040000|N/A|N/A|3840|455680|K_
-video|0|29|1.160000|26|1.040000|1|0.040000|N/A|N/A|24711|460288|K_
-audio|1|51840|1.080000|51840|1.080000|1920|0.040000|N/A|N/A|3840|485376|K_
-video|0|27|1.080000|27|1.080000|1|0.040000|N/A|N/A|10840|489984|__
-audio|1|53760|1.120000|53760|1.120000|1920|0.040000|N/A|N/A|3840|501248|K_
-video|0|28|1.120000|28|1.120000|1|0.040000|N/A|N/A|13350|505856|__
-audio|1|55680|1.160000|55680|1.160000|1920|0.040000|N/A|N/A|3840|519680|K_
-video|0|25|1.000000|24|0.960000|1|0.040000|N/A|N/A|24801|6144|K_|1
-Strings Metadata
-audio|1|48000|1.000000|48000|1.000000|1920|0.040000|N/A|N/A|3840|31232|K_|1
-Strings Metadata
-video|0|28|1.120000|25|1.000000|1|0.040000|N/A|N/A|16743|35840|__|1
-Strings Metadata
-audio|1|49920|1.040000|49920|1.040000|1920|0.040000|N/A|N/A|3840|52736|K_|1
-Strings Metadata
-video|0|26|1.040000|26|1.040000|1|0.040000|N/A|N/A|13812|57344|__|1
-Strings Metadata
-audio|1|51840|1.080000|51840|1.080000|1920|0.040000|N/A|N/A|3840|71680|K_|1
-Strings Metadata
-video|0|27|1.080000|27|1.080000|1|0.040000|N/A|N/A|13607|76288|__|1
-Strings Metadata
-audio|1|53760|1.120000|53760|1.120000|1920|0.040000|N/A|N/A|3840|90112|K_|1
-Strings Metadata
-video|0|31|1.240000|28|1.120000|1|0.040000|N/A|N/A|16158|94720|__|1
-Strings Metadata
-audio|1|55680|1.160000|55680|1.160000|1920|0.040000|N/A|N/A|3840|111104|K_|1
-Strings Metadata
-video|0|29|1.160000|29|1.160000|1|0.040000|N/A|N/A|13943|115712|__|1
-Strings Metadata
-audio|1|57600|1.200000|57600|1.200000|1920|0.040000|N/A|N/A|3840|130048|K_|1
-Strings Metadata
-video|0|30|1.200000|30|1.200000|1|0.040000|N/A|N/A|11223|134656|__|1
-Strings Metadata
-audio|1|59520|1.240000|59520|1.240000|1920|0.040000|N/A|N/A|3840|145920|K_|1
-Strings Metadata
-video|0|34|1.360000|31|1.240000|1|0.040000|N/A|N/A|20298|150528|__|1
-Strings Metadata
-audio|1|61440|1.280000|61440|1.280000|1920|0.040000|N/A|N/A|3840|171008|K_|1
-Strings Metadata
-video|0|32|1.280000|32|1.280000|1|0.040000|N/A|N/A|13341|175616|__|1
-Strings Metadata
-audio|1|63360|1.320000|63360|1.320000|1920|0.040000|N/A|N/A|3840|189440|K_|1
-Strings Metadata
-video|0|33|1.320000|33|1.320000|1|0.040000|N/A|N/A|12362|194048|__|1
-Strings Metadata
-audio|1|65280|1.360000|65280|1.360000|1920|0.040000|N/A|N/A|3840|206848|K_|1
-Strings Metadata
-video|0|37|1.480000|34|1.360000|1|0.040000|N/A|N/A|24786|211456|K_|1
+video|0|0|0.000000|-1|-0.040000|1|0.040000|N/A|N/A|24801|6656|K_
+audio|1|0|0.000000|0|0.000000|1920|0.040000|N/A|N/A|3840|31744|K_
+video|0|3|0.120000|0|0.000000|1|0.040000|N/A|N/A|16743|36352|__
+audio|1|1920|0.040000|1920|0.040000|1920|0.040000|N/A|N/A|3840|53248|K_
+video|0|1|0.040000|1|0.040000|1|0.040000|N/A|N/A|13812|57856|__
+audio|1|3840|0.080000|3840|0.080000|1920|0.040000|N/A|N/A|3840|72192|K_
+video|0|2|0.080000|2|0.080000|1|0.040000|N/A|N/A|13607|76800|__
+audio|1|5760|0.120000|5760|0.120000|1920|0.040000|N/A|N/A|3840|90624|K_
+video|0|6|0.240000|3|0.120000|1|0.040000|N/A|N/A|16158|95232|__
+audio|1|7680|0.160000|7680|0.160000|1920|0.040000|N/A|N/A|3840|111616|K_
+video|0|4|0.160000|4|0.160000|1|0.040000|N/A|N/A|13943|116224|__
+audio|1|9600|0.200000|9600|0.200000|1920|0.040000|N/A|N/A|3840|130560|K_
+video|0|5|0.200000|5|0.200000|1|0.040000|N/A|N/A|11223|135168|__
+audio|1|11520|0.240000|11520|0.240000|1920|0.040000|N/A|N/A|3840|146432|K_
+video|0|9|0.360000|6|0.240000|1|0.040000|N/A|N/A|20298|151040|__
+audio|1|13440|0.280000|13440|0.280000|1920|0.040000|N/A|N/A|3840|171520|K_
+video|0|7|0.280000|7|0.280000|1|0.040000|N/A|N/A|13341|176128|__
+audio|1|15360|0.320000|15360|0.320000|1920|0.040000|N/A|N/A|3840|189952|K_
+video|0|8|0.320000|8|0.320000|1|0.040000|N/A|N/A|12362|194560|__
+audio|1|17280|0.360000|17280|0.360000|1920|0.040000|N/A|N/A|3840|207360|K_
+video|0|12|0.480000|9|0.360000|1|0.040000|N/A|N/A|24786|211968|K_
+audio|1|19200|0.400000|19200|0.400000|1920|0.040000|N/A|N/A|3840|237056|K_
+video|0|10|0.400000|10|0.400000|1|0.040000|N/A|N/A|13377|241664|__
+audio|1|21120|0.440000|21120|0.440000|1920|0.040000|N/A|N/A|3840|255488|K_
+video|0|11|0.440000|11|0.440000|1|0.040000|N/A|N/A|15624|260096|__
+audio|1|23040|0.480000|23040|0.480000|1920|0.040000|N/A|N/A|3840|275968|K_
+video|0|15|0.600000|12|0.480000|1|0.040000|N/A|N/A|22597|280576|__
+audio|1|24960|0.520000|24960|0.520000|1920|0.040000|N/A|N/A|3840|303616|K_
+video|0|13|0.520000|13|0.520000|1|0.040000|N/A|N/A|15028|308224|__
+audio|1|26880|0.560000|26880|0.560000|1920|0.040000|N/A|N/A|3840|323584|K_
+video|0|14|0.560000|14|0.560000|1|0.040000|N/A|N/A|14014|328192|__
+audio|1|28800|0.600000|28800|0.600000|1920|0.040000|N/A|N/A|3840|342528|K_
+video|0|18|0.720000|15|0.600000|1|0.040000|N/A|N/A|20731|347136|__
+audio|1|30720|0.640000|30720|0.640000|1920|0.040000|N/A|N/A|3840|368128|K_
+video|0|16|0.640000|16|0.640000|1|0.040000|N/A|N/A|11946|372736|__
+audio|1|32640|0.680000|32640|0.680000|1920|0.040000|N/A|N/A|3840|385024|K_
+video|0|17|0.680000|17|0.680000|1|0.040000|N/A|N/A|14464|389632|__
+audio|1|34560|0.720000|34560|0.720000|1920|0.040000|N/A|N/A|3840|404480|K_
+video|0|21|0.840000|18|0.720000|1|0.040000|N/A|N/A|16189|409088|__
+audio|1|36480|0.760000|36480|0.760000|1920|0.040000|N/A|N/A|3840|425472|K_
+video|0|19|0.760000|19|0.760000|1|0.040000|N/A|N/A|10524|430080|__
+audio|1|38400|0.800000|38400|0.800000|1920|0.040000|N/A|N/A|3840|440832|K_
+video|0|20|0.800000|20|0.800000|1|0.040000|N/A|N/A|10599|445440|__
+audio|1|40320|0.840000|40320|0.840000|1920|0.040000|N/A|N/A|3840|456192|K_
+video|0|24|0.960000|21|0.840000|1|0.040000|N/A|N/A|24711|460800|K_
+audio|1|42240|0.880000|42240|0.880000|1920|0.040000|N/A|N/A|3840|485888|K_
+video|0|22|0.880000|22|0.880000|1|0.040000|N/A|N/A|10840|490496|__
+audio|1|44160|0.920000|44160|0.920000|1920|0.040000|N/A|N/A|3840|501760|K_
+video|0|23|0.920000|23|0.920000|1|0.040000|N/A|N/A|13350|506368|__
+audio|1|46080|0.960000|46080|0.960000|1920|0.040000|N/A|N/A|3840|520192|K_
+video|0|17|0.680000|14|0.560000|1|0.040000|N/A|N/A|24786|211968|K_
+audio|1|28800|0.600000|28800|0.600000|1920|0.040000|N/A|N/A|3840|237056|K_
+video|0|15|0.600000|15|0.600000|1|0.040000|N/A|N/A|13377|241664|__
+audio|1|30720|0.640000|30720|0.640000|1920|0.040000|N/A|N/A|3840|255488|K_
+video|0|16|0.640000|16|0.640000|1|0.040000|N/A|N/A|15624|260096|__
+audio|1|32640|0.680000|32640|0.680000|1920|0.040000|N/A|N/A|3840|275968|K_
+video|0|20|0.800000|17|0.680000|1|0.040000|N/A|N/A|22597|280576|__
+audio|1|34560|0.720000|34560|0.720000|1920|0.040000|N/A|N/A|3840|303616|K_
+video|0|18|0.720000|18|0.720000|1|0.040000|N/A|N/A|15028|308224|__
+audio|1|36480|0.760000|36480|0.760000|1920|0.040000|N/A|N/A|3840|323584|K_
+video|0|19|0.760000|19|0.760000|1|0.040000|N/A|N/A|14014|328192|__
+audio|1|38400|0.800000|38400|0.800000|1920|0.040000|N/A|N/A|3840|342528|K_
+video|0|23|0.920000|20|0.800000|1|0.040000|N/A|N/A|20731|347136|__
+audio|1|40320|0.840000|40320|0.840000|1920|0.040000|N/A|N/A|3840|368128|K_
+video|0|21|0.840000|21|0.840000|1|0.040000|N/A|N/A|11946|372736|__
+audio|1|42240|0.880000|42240|0.880000|1920|0.040000|N/A|N/A|3840|385024|K_
+video|0|22|0.880000|22|0.880000|1|0.040000|N/A|N/A|14464|389632|__
+audio|1|44160|0.920000|44160|0.920000|1920|0.040000|N/A|N/A|3840|404480|K_
+video|0|26|1.040000|23|0.920000|1|0.040000|N/A|N/A|16189|409088|__
+audio|1|46080|0.960000|46080|0.960000|1920|0.040000|N/A|N/A|3840|425472|K_
+video|0|24|0.960000|24|0.960000|1|0.040000|N/A|N/A|10524|430080|__
+audio|1|48000|1.000000|48000|1.000000|1920|0.040000|N/A|N/A|3840|440832|K_
+video|0|25|1.000000|25|1.000000|1|0.040000|N/A|N/A|10599|445440|__
+audio|1|49920|1.040000|49920|1.040000|1920|0.040000|N/A|N/A|3840|456192|K_
+video|0|29|1.160000|26|1.040000|1|0.040000|N/A|N/A|24711|460800|K_
+audio|1|51840|1.080000|51840|1.080000|1920|0.040000|N/A|N/A|3840|485888|K_
+video|0|27|1.080000|27|1.080000|1|0.040000|N/A|N/A|10840|490496|__
+audio|1|53760|1.120000|53760|1.120000|1920|0.040000|N/A|N/A|3840|501760|K_
+video|0|28|1.120000|28|1.120000|1|0.040000|N/A|N/A|13350|506368|__
+audio|1|55680|1.160000|55680|1.160000|1920|0.040000|N/A|N/A|3840|520192|K_
+video|0|25|1.000000|24|0.960000|1|0.040000|N/A|N/A|24801|6656|K_|1
+Strings Metadata
+audio|1|48000|1.000000|48000|1.000000|1920|0.040000|N/A|N/A|3840|31744|K_|1
+Strings Metadata
+video|0|28|1.120000|25|1.000000|1|0.040000|N/A|N/A|16743|36352|__|1
+Strings Metadata
+audio|1|49920|1.040000|49920|1.040000|1920|0.040000|N/A|N/A|3840|53248|K_|1
+Strings Metadata
+video|0|26|1.040000|26|1.040000|1|0.040000|N/A|N/A|13812|57856|__|1
+Strings Metadata
+audio|1|51840|1.080000|51840|1.080000|1920|0.040000|N/A|N/A|3840|72192|K_|1
+Strings Metadata
+video|0|27|1.080000|27|1.080000|1|0.040000|N/A|N/A|13607|76800|__|1
+Strings Metadata
+audio|1|53760|1.120000|53760|1.120000|1920|0.040000|N/A|N/A|3840|90624|K_|1
+Strings Metadata
+video|0|31|1.240000|28|1.120000|1|0.040000|N/A|N/A|16158|95232|__|1
+Strings Metadata
+audio|1|55680|1.160000|55680|1.160000|1920|0.040000|N/A|N/A|3840|111616|K_|1
+Strings Metadata
+video|0|29|1.160000|29|1.160000|1|0.040000|N/A|N/A|13943|116224|__|1
+Strings Metadata
+audio|1|57600|1.200000|57600|1.200000|1920|0.040000|N/A|N/A|3840|130560|K_|1
+Strings Metadata
+video|0|30|1.200000|30|1.200000|1|0.040000|N/A|N/A|11223|135168|__|1
+Strings Metadata
+audio|1|59520|1.240000|59520|1.240000|1920|0.040000|N/A|N/A|3840|146432|K_|1
+Strings Metadata
+video|0|34|1.360000|31|1.240000|1|0.040000|N/A|N/A|20298|151040|__|1
+Strings Metadata
+audio|1|61440|1.280000|61440|1.280000|1920|0.040000|N/A|N/A|3840|171520|K_|1
+Strings Metadata
+video|0|32|1.280000|32|1.280000|1|0.040000|N/A|N/A|13341|176128|__|1
+Strings Metadata
+audio|1|63360|1.320000|63360|1.320000|1920|0.040000|N/A|N/A|3840|189952|K_|1
+Strings Metadata
+video|0|33|1.320000|33|1.320000|1|0.040000|N/A|N/A|12362|194560|__|1
+Strings Metadata
+audio|1|65280|1.360000|65280|1.360000|1920|0.040000|N/A|N/A|3840|207360|K_|1
+Strings Metadata
+video|0|37|1.480000|34|1.360000|1|0.040000|N/A|N/A|24786|211968|K_|1
 Strings Metadata
 0|mpeg2video|4|video|1/25|[0][0][0][0]|0x0000|352|288|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|N/A|1|N/A|25/1|25/1|1/25|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|51|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
 1|pcm_s16le|unknown|audio|1/48000|[0][0][0][0]|0x0000|s16|48000|1|unknown|16|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|768000|N/A|N/A|N/A|N/A|50|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
diff --git a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10 b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10
index bd0e5e2a74..f6da7194ba 100644
--- a/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10
+++ b/tests/ref/fate/concat-demuxer-simple1-lavf-mxf_d10
@@ -1,82 +1,82 @@ 
-video|0|0|0.000000|0|0.000000|1|0.040000|N/A|N/A|150000|6144|K_
-audio|1|0|0.000000|0|0.000000|1920|0.040000|N/A|N/A|7680|156672|K_
-video|0|1|0.040000|1|0.040000|1|0.040000|N/A|N/A|150000|219136|K_
-audio|1|1920|0.040000|1920|0.040000|1920|0.040000|N/A|N/A|7680|369664|K_
-video|0|2|0.080000|2|0.080000|1|0.040000|N/A|N/A|150000|432128|K_
-audio|1|3840|0.080000|3840|0.080000|1920|0.040000|N/A|N/A|7680|582656|K_
-video|0|3|0.120000|3|0.120000|1|0.040000|N/A|N/A|150000|645120|K_
-audio|1|5760|0.120000|5760|0.120000|1920|0.040000|N/A|N/A|7680|795648|K_
-video|0|4|0.160000|4|0.160000|1|0.040000|N/A|N/A|150000|858112|K_
-audio|1|7680|0.160000|7680|0.160000|1920|0.040000|N/A|N/A|7680|1008640|K_
-video|0|5|0.200000|5|0.200000|1|0.040000|N/A|N/A|150000|1071104|K_
-audio|1|9600|0.200000|9600|0.200000|1920|0.040000|N/A|N/A|7680|1221632|K_
-video|0|6|0.240000|6|0.240000|1|0.040000|N/A|N/A|150000|1284096|K_
-audio|1|11520|0.240000|11520|0.240000|1920|0.040000|N/A|N/A|7680|1434624|K_
-video|0|7|0.280000|7|0.280000|1|0.040000|N/A|N/A|150000|1497088|K_
-audio|1|13440|0.280000|13440|0.280000|1920|0.040000|N/A|N/A|7680|1647616|K_
-video|0|8|0.320000|8|0.320000|1|0.040000|N/A|N/A|150000|1710080|K_
-audio|1|15360|0.320000|15360|0.320000|1920|0.040000|N/A|N/A|7680|1860608|K_
-video|0|9|0.360000|9|0.360000|1|0.040000|N/A|N/A|150000|1923072|K_
-audio|1|17280|0.360000|17280|0.360000|1920|0.040000|N/A|N/A|7680|2073600|K_
-video|0|10|0.400000|10|0.400000|1|0.040000|N/A|N/A|150000|2136064|K_
-audio|1|19200|0.400000|19200|0.400000|1920|0.040000|N/A|N/A|7680|2286592|K_
-video|0|11|0.440000|11|0.440000|1|0.040000|N/A|N/A|150000|2349056|K_
-audio|1|21120|0.440000|21120|0.440000|1920|0.040000|N/A|N/A|7680|2499584|K_
-video|0|12|0.480000|12|0.480000|1|0.040000|N/A|N/A|150000|2562048|K_
-audio|1|23040|0.480000|23040|0.480000|1920|0.040000|N/A|N/A|7680|2712576|K_
-video|0|13|0.520000|13|0.520000|1|0.040000|N/A|N/A|150000|2775040|K_
-audio|1|24960|0.520000|24960|0.520000|1920|0.040000|N/A|N/A|7680|2925568|K_
-video|0|14|0.560000|14|0.560000|1|0.040000|N/A|N/A|150000|2988032|K_
-audio|1|26880|0.560000|26880|0.560000|1920|0.040000|N/A|N/A|7680|3138560|K_
-video|0|15|0.600000|15|0.600000|1|0.040000|N/A|N/A|150000|3201024|K_
-audio|1|28800|0.600000|28800|0.600000|1920|0.040000|N/A|N/A|7680|3351552|K_
-video|0|16|0.640000|16|0.640000|1|0.040000|N/A|N/A|150000|3414016|K_
-audio|1|30720|0.640000|30720|0.640000|1920|0.040000|N/A|N/A|7680|3564544|K_
-video|0|17|0.680000|17|0.680000|1|0.040000|N/A|N/A|150000|3627008|K_
-audio|1|32640|0.680000|32640|0.680000|1920|0.040000|N/A|N/A|7680|3777536|K_
-video|0|18|0.720000|18|0.720000|1|0.040000|N/A|N/A|150000|3840000|K_
-audio|1|34560|0.720000|34560|0.720000|1920|0.040000|N/A|N/A|7680|3990528|K_
-video|0|19|0.760000|19|0.760000|1|0.040000|N/A|N/A|150000|4052992|K_
-audio|1|36480|0.760000|36480|0.760000|1920|0.040000|N/A|N/A|7680|4203520|K_
-video|0|20|0.800000|20|0.800000|1|0.040000|N/A|N/A|150000|4265984|K_
-audio|1|38400|0.800000|38400|0.800000|1920|0.040000|N/A|N/A|7680|4416512|K_
-video|0|21|0.840000|21|0.840000|1|0.040000|N/A|N/A|150000|4478976|K_
-audio|1|40320|0.840000|40320|0.840000|1920|0.040000|N/A|N/A|7680|4629504|K_
-video|0|22|0.880000|22|0.880000|1|0.040000|N/A|N/A|150000|4691968|K_
-audio|1|42240|0.880000|42240|0.880000|1920|0.040000|N/A|N/A|7680|4842496|K_
-video|0|23|0.920000|23|0.920000|1|0.040000|N/A|N/A|150000|4904960|K_
-audio|1|44160|0.920000|44160|0.920000|1920|0.040000|N/A|N/A|7680|5055488|K_
-video|0|24|0.960000|24|0.960000|1|0.040000|N/A|N/A|150000|5117952|K_
-audio|1|46080|0.960000|46080|0.960000|1920|0.040000|N/A|N/A|7680|5268480|K_
-video|0|25|1.000000|25|1.000000|1|0.040000|N/A|N/A|150000|4265984|K_
-audio|1|48000|1.000000|48000|1.000000|1920|0.040000|N/A|N/A|7680|4416512|K_
-video|0|26|1.040000|26|1.040000|1|0.040000|N/A|N/A|150000|4478976|K_
-audio|1|49920|1.040000|49920|1.040000|1920|0.040000|N/A|N/A|7680|4629504|K_
-video|0|27|1.080000|27|1.080000|1|0.040000|N/A|N/A|150000|4691968|K_
-audio|1|51840|1.080000|51840|1.080000|1920|0.040000|N/A|N/A|7680|4842496|K_
-video|0|28|1.120000|28|1.120000|1|0.040000|N/A|N/A|150000|4904960|K_
-audio|1|53760|1.120000|53760|1.120000|1920|0.040000|N/A|N/A|7680|5055488|K_
-video|0|29|1.160000|29|1.160000|1|0.040000|N/A|N/A|150000|5117952|K_
-audio|1|55680|1.160000|55680|1.160000|1920|0.040000|N/A|N/A|7680|5268480|K_
-video|0|30|1.200000|30|1.200000|1|0.040000|N/A|N/A|150000|1071104|K_|1
+video|0|0|0.000000|0|0.000000|1|0.040000|N/A|N/A|150000|6656|K_
+audio|1|0|0.000000|0|0.000000|1920|0.040000|N/A|N/A|7680|157184|K_
+video|0|1|0.040000|1|0.040000|1|0.040000|N/A|N/A|150000|219648|K_
+audio|1|1920|0.040000|1920|0.040000|1920|0.040000|N/A|N/A|7680|370176|K_
+video|0|2|0.080000|2|0.080000|1|0.040000|N/A|N/A|150000|432640|K_
+audio|1|3840|0.080000|3840|0.080000|1920|0.040000|N/A|N/A|7680|583168|K_
+video|0|3|0.120000|3|0.120000|1|0.040000|N/A|N/A|150000|645632|K_
+audio|1|5760|0.120000|5760|0.120000|1920|0.040000|N/A|N/A|7680|796160|K_
+video|0|4|0.160000|4|0.160000|1|0.040000|N/A|N/A|150000|858624|K_
+audio|1|7680|0.160000|7680|0.160000|1920|0.040000|N/A|N/A|7680|1009152|K_
+video|0|5|0.200000|5|0.200000|1|0.040000|N/A|N/A|150000|1071616|K_
+audio|1|9600|0.200000|9600|0.200000|1920|0.040000|N/A|N/A|7680|1222144|K_
+video|0|6|0.240000|6|0.240000|1|0.040000|N/A|N/A|150000|1284608|K_
+audio|1|11520|0.240000|11520|0.240000|1920|0.040000|N/A|N/A|7680|1435136|K_
+video|0|7|0.280000|7|0.280000|1|0.040000|N/A|N/A|150000|1497600|K_
+audio|1|13440|0.280000|13440|0.280000|1920|0.040000|N/A|N/A|7680|1648128|K_
+video|0|8|0.320000|8|0.320000|1|0.040000|N/A|N/A|150000|1710592|K_
+audio|1|15360|0.320000|15360|0.320000|1920|0.040000|N/A|N/A|7680|1861120|K_
+video|0|9|0.360000|9|0.360000|1|0.040000|N/A|N/A|150000|1923584|K_
+audio|1|17280|0.360000|17280|0.360000|1920|0.040000|N/A|N/A|7680|2074112|K_
+video|0|10|0.400000|10|0.400000|1|0.040000|N/A|N/A|150000|2136576|K_
+audio|1|19200|0.400000|19200|0.400000|1920|0.040000|N/A|N/A|7680|2287104|K_
+video|0|11|0.440000|11|0.440000|1|0.040000|N/A|N/A|150000|2349568|K_
+audio|1|21120|0.440000|21120|0.440000|1920|0.040000|N/A|N/A|7680|2500096|K_
+video|0|12|0.480000|12|0.480000|1|0.040000|N/A|N/A|150000|2562560|K_
+audio|1|23040|0.480000|23040|0.480000|1920|0.040000|N/A|N/A|7680|2713088|K_
+video|0|13|0.520000|13|0.520000|1|0.040000|N/A|N/A|150000|2775552|K_
+audio|1|24960|0.520000|24960|0.520000|1920|0.040000|N/A|N/A|7680|2926080|K_
+video|0|14|0.560000|14|0.560000|1|0.040000|N/A|N/A|150000|2988544|K_
+audio|1|26880|0.560000|26880|0.560000|1920|0.040000|N/A|N/A|7680|3139072|K_
+video|0|15|0.600000|15|0.600000|1|0.040000|N/A|N/A|150000|3201536|K_
+audio|1|28800|0.600000|28800|0.600000|1920|0.040000|N/A|N/A|7680|3352064|K_
+video|0|16|0.640000|16|0.640000|1|0.040000|N/A|N/A|150000|3414528|K_
+audio|1|30720|0.640000|30720|0.640000|1920|0.040000|N/A|N/A|7680|3565056|K_
+video|0|17|0.680000|17|0.680000|1|0.040000|N/A|N/A|150000|3627520|K_
+audio|1|32640|0.680000|32640|0.680000|1920|0.040000|N/A|N/A|7680|3778048|K_
+video|0|18|0.720000|18|0.720000|1|0.040000|N/A|N/A|150000|3840512|K_
+audio|1|34560|0.720000|34560|0.720000|1920|0.040000|N/A|N/A|7680|3991040|K_
+video|0|19|0.760000|19|0.760000|1|0.040000|N/A|N/A|150000|4053504|K_
+audio|1|36480|0.760000|36480|0.760000|1920|0.040000|N/A|N/A|7680|4204032|K_
+video|0|20|0.800000|20|0.800000|1|0.040000|N/A|N/A|150000|4266496|K_
+audio|1|38400|0.800000|38400|0.800000|1920|0.040000|N/A|N/A|7680|4417024|K_
+video|0|21|0.840000|21|0.840000|1|0.040000|N/A|N/A|150000|4479488|K_
+audio|1|40320|0.840000|40320|0.840000|1920|0.040000|N/A|N/A|7680|4630016|K_
+video|0|22|0.880000|22|0.880000|1|0.040000|N/A|N/A|150000|4692480|K_
+audio|1|42240|0.880000|42240|0.880000|1920|0.040000|N/A|N/A|7680|4843008|K_
+video|0|23|0.920000|23|0.920000|1|0.040000|N/A|N/A|150000|4905472|K_
+audio|1|44160|0.920000|44160|0.920000|1920|0.040000|N/A|N/A|7680|5056000|K_
+video|0|24|0.960000|24|0.960000|1|0.040000|N/A|N/A|150000|5118464|K_
+audio|1|46080|0.960000|46080|0.960000|1920|0.040000|N/A|N/A|7680|5268992|K_
+video|0|25|1.000000|25|1.000000|1|0.040000|N/A|N/A|150000|4266496|K_
+audio|1|48000|1.000000|48000|1.000000|1920|0.040000|N/A|N/A|7680|4417024|K_
+video|0|26|1.040000|26|1.040000|1|0.040000|N/A|N/A|150000|4479488|K_
+audio|1|49920|1.040000|49920|1.040000|1920|0.040000|N/A|N/A|7680|4630016|K_
+video|0|27|1.080000|27|1.080000|1|0.040000|N/A|N/A|150000|4692480|K_
+audio|1|51840|1.080000|51840|1.080000|1920|0.040000|N/A|N/A|7680|4843008|K_
+video|0|28|1.120000|28|1.120000|1|0.040000|N/A|N/A|150000|4905472|K_
+audio|1|53760|1.120000|53760|1.120000|1920|0.040000|N/A|N/A|7680|5056000|K_
+video|0|29|1.160000|29|1.160000|1|0.040000|N/A|N/A|150000|5118464|K_
+audio|1|55680|1.160000|55680|1.160000|1920|0.040000|N/A|N/A|7680|5268992|K_
+video|0|30|1.200000|30|1.200000|1|0.040000|N/A|N/A|150000|1071616|K_|1
 Strings Metadata
-audio|1|57600|1.200000|57600|1.200000|1920|0.040000|N/A|N/A|7680|1221632|K_|1
+audio|1|57600|1.200000|57600|1.200000|1920|0.040000|N/A|N/A|7680|1222144|K_|1
 Strings Metadata
-video|0|31|1.240000|31|1.240000|1|0.040000|N/A|N/A|150000|1284096|K_|1
+video|0|31|1.240000|31|1.240000|1|0.040000|N/A|N/A|150000|1284608|K_|1
 Strings Metadata
-audio|1|59520|1.240000|59520|1.240000|1920|0.040000|N/A|N/A|7680|1434624|K_|1
+audio|1|59520|1.240000|59520|1.240000|1920|0.040000|N/A|N/A|7680|1435136|K_|1
 Strings Metadata
-video|0|32|1.280000|32|1.280000|1|0.040000|N/A|N/A|150000|1497088|K_|1
+video|0|32|1.280000|32|1.280000|1|0.040000|N/A|N/A|150000|1497600|K_|1
 Strings Metadata
-audio|1|61440|1.280000|61440|1.280000|1920|0.040000|N/A|N/A|7680|1647616|K_|1
+audio|1|61440|1.280000|61440|1.280000|1920|0.040000|N/A|N/A|7680|1648128|K_|1
 Strings Metadata
-video|0|33|1.320000|33|1.320000|1|0.040000|N/A|N/A|150000|1710080|K_|1
+video|0|33|1.320000|33|1.320000|1|0.040000|N/A|N/A|150000|1710592|K_|1
 Strings Metadata
-audio|1|63360|1.320000|63360|1.320000|1920|0.040000|N/A|N/A|7680|1860608|K_|1
+audio|1|63360|1.320000|63360|1.320000|1920|0.040000|N/A|N/A|7680|1861120|K_|1
 Strings Metadata
-video|0|34|1.360000|34|1.360000|1|0.040000|N/A|N/A|150000|1923072|K_|1
+video|0|34|1.360000|34|1.360000|1|0.040000|N/A|N/A|150000|1923584|K_|1
 Strings Metadata
-audio|1|65280|1.360000|65280|1.360000|1920|0.040000|N/A|N/A|7680|2073600|K_|1
+audio|1|65280|1.360000|65280|1.360000|1920|0.040000|N/A|N/A|7680|2074112|K_|1
 Strings Metadata
 0|mpeg2video|0|video|1/25|[0][0][0][0]|0x0000|720|608|0|0|0|1:1|45:38|yuv422p|5|tv|unknown|unknown|unknown|topleft|tt|N/A|1|N/A|25/1|25/1|1/25|0|0.000000|N/A|N/A|30000000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
 1|pcm_s16le|unknown|audio|1/48000|[0][0][0][0]|0x0000|s16|48000|2|unknown|16|N/A|0/0|0/0|1/48000|0|0.000000|N/A|N/A|1536000|N/A|N/A|N/A|N/A|35|0|0|0|0|0|0|0|0|0|0|0|0|0x060A2B340101010501010D001300000000000000000000000000000000000001
diff --git a/tests/ref/seek/lavf-mxf b/tests/ref/seek/lavf-mxf
index 93d419722b..ea0e0b6995 100644
--- a/tests/ref/seek/lavf-mxf
+++ b/tests/ref/seek/lavf-mxf
@@ -1,48 +1,48 @@ 
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret: 0         st: 0 flags:1  ts:-0.320000
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret:-1         st: 1 flags:0  ts: 2.576667
 ret: 0         st: 1 flags:1  ts: 1.470833
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret: 0         st:-1 flags:0  ts: 0.365002
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211968 size: 24786
 ret: 0         st:-1 flags:1  ts:-0.740831
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret:-1         st: 0 flags:0  ts: 2.160000
 ret: 0         st: 0 flags:1  ts: 1.040000
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret: 0         st: 1 flags:0  ts:-0.058333
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret: 0         st: 1 flags:1  ts: 2.835833
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret:-1         st:-1 flags:0  ts: 1.730004
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211968 size: 24786
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret:-1         st: 1 flags:0  ts: 1.306667
 ret: 0         st: 1 flags:1  ts: 0.200833
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret: 0         st:-1 flags:0  ts:-0.904994
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret: 0         st:-1 flags:1  ts: 1.989173
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret: 0         st: 0 flags:0  ts: 0.880000
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret: 0         st: 0 flags:1  ts:-0.240000
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
 ret:-1         st: 1 flags:0  ts: 2.671667
 ret: 0         st: 1 flags:1  ts: 1.565833
-ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460288 size: 24711
+ret: 0         st: 0 flags:1 dts: 0.840000 pts: 0.960000 pos: 460800 size: 24711
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211456 size: 24786
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.480000 pos: 211968 size: 24786
 ret: 0         st:-1 flags:1  ts:-0.645825
-ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6144 size: 24801
+ret: 0         st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos:   6656 size: 24801
diff --git a/tests/ref/seek/lavf-mxf_d10 b/tests/ref/seek/lavf-mxf_d10
index 5a682f0927..a154d34281 100644
--- a/tests/ref/seek/lavf-mxf_d10
+++ b/tests/ref/seek/lavf-mxf_d10
@@ -1,53 +1,53 @@ 
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:4265984 size:150000
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:4266496 size:150000
 ret: 0         st: 0 flags:1  ts:-0.320000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st: 1 flags:0  ts: 2.576667
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 1 flags:1  ts: 1.470833
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st:-1 flags:0  ts: 0.365002
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1923072 size:150000
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1923584 size:150000
 ret: 0         st:-1 flags:1  ts:-0.740831
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st: 0 flags:0  ts: 2.160000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 0 flags:1  ts: 1.040000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 1 flags:0  ts:-0.058333
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st: 1 flags:1  ts: 2.835833
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:3414016 size:150000
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:3414528 size:150000
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 1 flags:0  ts: 1.306667
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 1 flags:1  ts: 0.200833
-ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1071104 size:150000
+ret: 0         st: 0 flags:1 dts: 0.200000 pts: 0.200000 pos:1071616 size:150000
 ret: 0         st:-1 flags:0  ts:-0.904994
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st:-1 flags:1  ts: 1.989173
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 0 flags:0  ts: 0.880000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:4691968 size:150000
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:4692480 size:150000
 ret: 0         st: 0 flags:1  ts:-0.240000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
 ret: 0         st: 1 flags:0  ts: 2.671667
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st: 1 flags:1  ts: 1.565833
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5117952 size:150000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:5118464 size:150000
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:2562048 size:150000
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:2562560 size:150000
 ret: 0         st:-1 flags:1  ts:-0.645825
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:150000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:150000
diff --git a/tests/ref/seek/lavf-mxf_dv25 b/tests/ref/seek/lavf-mxf_dv25
index 42b3bbdfce..4ce49a41f5 100644
--- a/tests/ref/seek/lavf-mxf_dv25
+++ b/tests/ref/seek/lavf-mxf_dv25
@@ -1,53 +1,53 @@ 
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680768 size:144000
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3067904 size:144000
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:3068416 size:144000
 ret: 0         st: 0 flags:1  ts:-0.320000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st: 1 flags:0  ts: 2.576667
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680768 size:144000
 ret: 0         st: 1 flags:1  ts: 1.470833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680768 size:144000
 ret: 0         st:-1 flags:0  ts: 0.365002
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1383936 size:144000
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:1384448 size:144000
 ret: 0         st:-1 flags:1  ts:-0.740831
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st: 0 flags:0  ts: 2.160000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680768 size:144000
 ret: 0         st: 0 flags:1  ts: 1.040000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680768 size:144000
 ret: 0         st: 1 flags:0  ts:-0.058333
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st: 1 flags:1  ts: 2.835833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680768 size:144000
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680768 size:144000
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2455552 size:144000
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:2456064 size:144000
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680768 size:144000
 ret: 0         st: 1 flags:0  ts: 1.306667
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680768 size:144000
 ret: 0         st: 1 flags:1  ts: 0.200833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 771584 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 772096 size:144000
 ret: 0         st:-1 flags:0  ts:-0.904994
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st:-1 flags:1  ts: 1.989173
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:3680768 size:144000
 ret: 0         st: 0 flags:0  ts: 0.880000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3374080 size:144000
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:3374592 size:144000
 ret: 0         st: 0 flags:1  ts:-0.240000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
 ret: 0         st: 1 flags:0  ts: 2.671667
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680768 size:144000
 ret: 0         st: 1 flags:1  ts: 1.565833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680256 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:3680768 size:144000
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1843200 size:144000
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:1843712 size:144000
 ret: 0         st:-1 flags:1  ts:-0.645825
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:144000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:144000
diff --git a/tests/ref/seek/lavf-mxf_dvcpro50 b/tests/ref/seek/lavf-mxf_dvcpro50
index c3d9d3afd7..a2b477b211 100644
--- a/tests/ref/seek/lavf-mxf_dvcpro50
+++ b/tests/ref/seek/lavf-mxf_dvcpro50
@@ -1,53 +1,53 @@ 
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133696 size:288000
 ret: 0         st: 0 flags:0  ts: 0.800000
-ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:5945344 size:288000
+ret: 0         st: 0 flags:1 dts: 0.800000 pts: 0.800000 pos:5945856 size:288000
 ret: 0         st: 0 flags:1  ts:-0.320000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st: 1 flags:0  ts: 2.576667
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133696 size:288000
 ret: 0         st: 1 flags:1  ts: 1.470833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133696 size:288000
 ret: 0         st:-1 flags:0  ts: 0.365002
-ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2678784 size:288000
+ret: 0         st: 0 flags:1 dts: 0.360000 pts: 0.360000 pos:2679296 size:288000
 ret: 0         st:-1 flags:1  ts:-0.740831
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st: 0 flags:0  ts: 2.160000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133696 size:288000
 ret: 0         st: 0 flags:1  ts: 1.040000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133696 size:288000
 ret: 0         st: 1 flags:0  ts:-0.058333
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st: 1 flags:1  ts: 2.835833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133696 size:288000
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133696 size:288000
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4757504 size:288000
+ret: 0         st: 0 flags:1 dts: 0.640000 pts: 0.640000 pos:4758016 size:288000
 ret: 0         st: 0 flags:0  ts:-0.480000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st: 0 flags:1  ts: 2.400000
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133696 size:288000
 ret: 0         st: 1 flags:0  ts: 1.306667
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133696 size:288000
 ret: 0         st: 1 flags:1  ts: 0.200833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:1490944 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:1491456 size:288000
 ret: 0         st:-1 flags:0  ts:-0.904994
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st:-1 flags:1  ts: 1.989173
-ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos:7133696 size:288000
 ret: 0         st: 0 flags:0  ts: 0.880000
-ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6539264 size:288000
+ret: 0         st: 0 flags:1 dts: 0.880000 pts: 0.880000 pos:6539776 size:288000
 ret: 0         st: 0 flags:1  ts:-0.240000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
 ret: 0         st: 1 flags:0  ts: 2.671667
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133696 size:288000
 ret: 0         st: 1 flags:1  ts: 1.565833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133184 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:7133696 size:288000
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3569664 size:288000
+ret: 0         st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos:3570176 size:288000
 ret: 0         st:-1 flags:1  ts:-0.645825
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6144 size:288000
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   6656 size:288000
diff --git a/tests/ref/seek/lavf-mxf_opatom_audio b/tests/ref/seek/lavf-mxf_opatom_audio
index 2d1a7cc350..12d4644dc2 100644
--- a/tests/ref/seek/lavf-mxf_opatom_audio
+++ b/tests/ref/seek/lavf-mxf_opatom_audio
@@ -1,53 +1,53 @@ 
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st:-1 flags:0  ts:-1.000000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st:-1 flags:1  ts: 1.894167
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st: 0 flags:0  ts: 0.788333
-ret: 0         st: 0 flags:1 dts: 0.788333 pts: 0.788333 pos:  80313 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.788333 pts: 0.788333 pos:  80825 size:  3840
 ret: 0         st: 0 flags:1  ts:-0.317500
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st:-1 flags:0  ts: 2.576668
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:1  ts: 1.470835
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st: 0 flags:0  ts: 0.365000
-ret: 0         st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos:  39673 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.365000 pts: 0.365000 pos:  40185 size:  3840
 ret: 0         st: 0 flags:1  ts:-0.740833
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st:-1 flags:0  ts: 2.153336
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:1  ts: 1.047503
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st: 0 flags:0  ts:-0.058333
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st: 0 flags:1  ts: 2.835833
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:0  ts: 1.730004
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:1  ts: 0.624171
-ret: 0         st: 0 flags:1 dts: 0.624167 pts: 0.624167 pos:  64553 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.624167 pts: 0.624167 pos:  65065 size:  3840
 ret: 0         st: 0 flags:0  ts:-0.481667
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st: 0 flags:1  ts: 2.412500
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:0  ts: 1.306672
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:1  ts: 0.200839
-ret: 0         st: 0 flags:1 dts: 0.200833 pts: 0.200833 pos:  23913 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.200833 pts: 0.200833 pos:  24425 size:  3840
 ret: 0         st: 0 flags:0  ts:-0.905000
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st: 0 flags:1  ts: 1.989167
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:0  ts: 0.883340
-ret: 0         st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos:  89433 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos:  89945 size:  3840
 ret: 0         st:-1 flags:1  ts:-0.222493
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840
 ret: 0         st: 0 flags:0  ts: 2.671667
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st: 0 flags:1  ts: 1.565833
-ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 100631 size:     2
+ret: 0         st: 0 flags:1 dts: 0.999979 pts: 0.999979 pos: 101143 size:     2
 ret: 0         st:-1 flags:0  ts: 0.460008
-ret: 0         st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos:  48793 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos:  49305 size:  3840
 ret: 0         st:-1 flags:1  ts:-0.645825
-ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   4633 size:  3840
+ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:   5145 size:  3840