diff mbox series

[FFmpeg-devel,12/12] lavf/framecrcenc: do not hash side data

Message ID 20210425070320.14197-12-anton@khirnov.net
State Accepted
Headers show
Series [FFmpeg-devel,01/12] ffprobe: only hash extradata when it is present
Related show

Checks

Context Check Description
andriy/configure warning Failed to apply patch
andriy/configure warning Failed to apply patch

Commit Message

Anton Khirnov April 25, 2021, 7:03 a.m. UTC
There are no guarantees that all side data types have the same
representation on all platforms.

Tests that change output due to this:

id3v2-priv-remux, cover-art-mp3-id3v2-remux, gapless-mp3: SKIP_SAMPLES,
which is tested by fate-gapless-mp3-side-data

matroska-vp8-alpha-remux: MATROSKA_BLOCKADDITIONAL, which is tested by
remux itself (side data is written into output)

matroska-mastering-display-metadata: MASTERING_DISPLAY_METADATA and
CONTENT_LIGHT_LEVEL, which are tested by ffprobe invocation in the same
test

matroska-spherical-mono-remux: STEREO3D and SPHERICAL, which are tested
by ffprobe invocation in the same test

segment-mp4-to-ts: MPEGTS_STREAM_ID, which is tested by ts remuxing
tests

webm-webvtt-remux: WEBVTT_IDENTIFIER/SETTINGS, which is tested by the
ffprobe invocation in the same test

mxf-d10-user-comments: CPB_PROPERTIES, which is tested by mxf-probe-d10

mov-cover-image: SKIP_SAMPLES, which is tested for mov by
mov-aac-2048-priming

copy-trac3074: AUDIO_SERVICE_TYPE, which is tested by fate-hls-fmp4_ac3
---
 libavformat/framecrcenc.c                     |  71 -----
 tests/ref/fate/copy-trac3074                  |   2 +-
 tests/ref/fate/cover-art-mp3-id3v2-remux      |   2 +-
 tests/ref/fate/gapless-mp3                    |   6 +-
 tests/ref/fate/id3v2-priv-remux               |   2 +-
 .../fate/matroska-mastering-display-metadata  |   4 +-
 tests/ref/fate/matroska-spherical-mono-remux  |   4 +-
 tests/ref/fate/matroska-vp8-alpha-remux       |  14 +-
 tests/ref/fate/mov-cover-image                |   2 +-
 tests/ref/fate/mxf-d10-user-comments          |   2 +-
 tests/ref/fate/segment-mp4-to-ts              | 250 +++++++++---------
 tests/ref/fate/webm-webvtt-remux              |  24 +-
 12 files changed, 156 insertions(+), 227 deletions(-)

Comments

Michael Niedermayer May 10, 2021, 2:06 p.m. UTC | #1
On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
> There are no guarantees that all side data types have the same
> representation on all platforms.

> @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
>               pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
>      if (pkt->flags != AV_PKT_FLAG_KEY)
>          av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
> -    if (pkt->side_data_elems) {
> -        int i;
> -        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);

The number and type of the side data elements should not be affected
by the problem described.
Maybe we could leave that. Bugs could manifest as the absence or addition
of side data, seeing that in framecrc_write_packet() output may be usefull

thx

[...]
Anton Khirnov May 14, 2021, 8:01 a.m. UTC | #2
Quoting Michael Niedermayer (2021-05-10 16:06:01)
> On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
> > There are no guarantees that all side data types have the same
> > representation on all platforms.
> 
> > @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
> >               pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
> >      if (pkt->flags != AV_PKT_FLAG_KEY)
> >          av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
> > -    if (pkt->side_data_elems) {
> > -        int i;
> > -        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
> 
> The number and type of the side data elements should not be affected
> by the problem described.
> Maybe we could leave that. Bugs could manifest as the absence or addition
> of side data, seeing that in framecrc_write_packet() output may be usefull

No strong opinion here - patches welcome I guess.
James Almer May 14, 2021, 12:42 p.m. UTC | #3
On 5/14/2021 5:01 AM, Anton Khirnov wrote:
> Quoting Michael Niedermayer (2021-05-10 16:06:01)
>> On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
>>> There are no guarantees that all side data types have the same
>>> representation on all platforms.
>>
>>> @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
>>>                pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
>>>       if (pkt->flags != AV_PKT_FLAG_KEY)
>>>           av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
>>> -    if (pkt->side_data_elems) {
>>> -        int i;
>>> -        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
>>
>> The number and type of the side data elements should not be affected
>> by the problem described.
>> Maybe we could leave that. Bugs could manifest as the absence or addition
>> of side data, seeing that in framecrc_write_packet() output may be usefull
> 
> No strong opinion here - patches welcome I guess.

I can do it, but it will be a "breaking" change, assuming there are 
parsers that read the output of this muxer.
Right now you removed all the trailing properties, which while also 
breaking, a sane parser made for the old output can simply assume that 
the line was truncated. But if we re-add the side data amount and sizes 
for each of them without the hashes, things can get parsed the wrong way.

Namely, it used to be:
> 0,          0,          0,       16,    57008, 0x43416399, S=2,        8, 0x08e5014f,       88, 0xd65a04db

And now it will be something like:
> 0,          0,          0,       16,    57008, 0x43416399, S=2,        8,       88

So the question is, do we care about this? The framehash/framemd5 muxer 
prints a version number, which lets us make breaking additions parsers 
can then properly handle. Should we then just consider that parsing 
framecrc output is not a supported scenario?
Michael Niedermayer May 14, 2021, 6:16 p.m. UTC | #4
On Fri, May 14, 2021 at 09:42:10AM -0300, James Almer wrote:
> On 5/14/2021 5:01 AM, Anton Khirnov wrote:
> > Quoting Michael Niedermayer (2021-05-10 16:06:01)
> > > On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
> > > > There are no guarantees that all side data types have the same
> > > > representation on all platforms.
> > > 
> > > > @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
> > > >                pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
> > > >       if (pkt->flags != AV_PKT_FLAG_KEY)
> > > >           av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
> > > > -    if (pkt->side_data_elems) {
> > > > -        int i;
> > > > -        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
> > > 
> > > The number and type of the side data elements should not be affected
> > > by the problem described.
> > > Maybe we could leave that. Bugs could manifest as the absence or addition
> > > of side data, seeing that in framecrc_write_packet() output may be usefull
> > 
> > No strong opinion here - patches welcome I guess.
> 
> I can do it, but it will be a "breaking" change, assuming there are parsers
> that read the output of this muxer.

does anyone know of such parsers ?
or does anyone have an idea what such parser could be used for ?


> Right now you removed all the trailing properties, which while also
> breaking, a sane parser made for the old output can simply assume that the
> line was truncated. But if we re-add the side data amount and sizes for each
> of them without the hashes, things can get parsed the wrong way.
> 
> Namely, it used to be:
> > 0,          0,          0,       16,    57008, 0x43416399, S=2,        8, 0x08e5014f,       88, 0xd65a04db
> 
> And now it will be something like:
> > 0,          0,          0,       16,    57008, 0x43416399, S=2,        8,       88
> 
> So the question is, do we care about this? The framehash/framemd5 muxer
> prints a version number, which lets us make breaking additions parsers can
> then properly handle. Should we then just consider that parsing framecrc
> output is not a supported scenario?

the version should probably be increased 
we also could leave the checksum in there but pick one that does not change
when 0 padding is added or endian changes, an example would be a sum of all
bytes. But in the strictest interpretation i guess that still would not be
platform independant.

Thanks

[...]
James Almer May 14, 2021, 6:46 p.m. UTC | #5
On 5/14/2021 3:16 PM, Michael Niedermayer wrote:
> On Fri, May 14, 2021 at 09:42:10AM -0300, James Almer wrote:
>> On 5/14/2021 5:01 AM, Anton Khirnov wrote:
>>> Quoting Michael Niedermayer (2021-05-10 16:06:01)
>>>> On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
>>>>> There are no guarantees that all side data types have the same
>>>>> representation on all platforms.
>>>>
>>>>> @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
>>>>>                 pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
>>>>>        if (pkt->flags != AV_PKT_FLAG_KEY)
>>>>>            av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
>>>>> -    if (pkt->side_data_elems) {
>>>>> -        int i;
>>>>> -        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
>>>>
>>>> The number and type of the side data elements should not be affected
>>>> by the problem described.
>>>> Maybe we could leave that. Bugs could manifest as the absence or addition
>>>> of side data, seeing that in framecrc_write_packet() output may be usefull
>>>
>>> No strong opinion here - patches welcome I guess.
>>
>> I can do it, but it will be a "breaking" change, assuming there are parsers
>> that read the output of this muxer.
> 
> does anyone know of such parsers ?

No, it's hypothetical.

> or does anyone have an idea what such parser could be used for ?

Users that can't or don't want to write programs using the libraries and 
find it easier to write perl scripts that parse the output of CLI like 
ffmpeg and ffprobe.

Technically speaking, many of our regression tests do exactly that.

> 
> 
>> Right now you removed all the trailing properties, which while also
>> breaking, a sane parser made for the old output can simply assume that the
>> line was truncated. But if we re-add the side data amount and sizes for each
>> of them without the hashes, things can get parsed the wrong way.
>>
>> Namely, it used to be:
>>> 0,          0,          0,       16,    57008, 0x43416399, S=2,        8, 0x08e5014f,       88, 0xd65a04db
>>
>> And now it will be something like:
>>> 0,          0,          0,       16,    57008, 0x43416399, S=2,        8,       88
>>
>> So the question is, do we care about this? The framehash/framemd5 muxer
>> prints a version number, which lets us make breaking additions parsers can
>> then properly handle. Should we then just consider that parsing framecrc
>> output is not a supported scenario?
> 
> the version should probably be increased

framemd5/framehash != framecrc. The former is versioned, but the latter, 
which this discussion is about, is not, so we should decide if that 
means its output is to be considered fixed or not.

I'm inclined to say it shouldn't. There's framehash for a versioned 
output that's guaranteed to not change, which also supports adler32 (the 
algorithm used by framecrc).

> we also could leave the checksum in there but pick one that does not change
> when 0 padding is added or endian changes, an example would be a sum of all
> bytes. But in the strictest interpretation i guess that still would not be
> platform independant.
> 
> Thanks
> 
> [...]
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
Andreas Rheinhardt May 14, 2021, 8:24 p.m. UTC | #6
James Almer:
> On 5/14/2021 3:16 PM, Michael Niedermayer wrote:
>> On Fri, May 14, 2021 at 09:42:10AM -0300, James Almer wrote:
>>> On 5/14/2021 5:01 AM, Anton Khirnov wrote:
>>>> Quoting Michael Niedermayer (2021-05-10 16:06:01)
>>>>> On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
>>>>>> There are no guarantees that all side data types have the same
>>>>>> representation on all platforms.
>>>>>
>>>>>> @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct
>>>>>> AVFormatContext *s, AVPacket *pkt)
>>>>>>                 pkt->stream_index, pkt->dts, pkt->pts,
>>>>>> pkt->duration, pkt->size, crc);
>>>>>>        if (pkt->flags != AV_PKT_FLAG_KEY)
>>>>>>            av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
>>>>>> -    if (pkt->side_data_elems) {
>>>>>> -        int i;
>>>>>> -        av_strlcatf(buf, sizeof(buf), ", S=%d",
>>>>>> pkt->side_data_elems);
>>>>>
>>>>> The number and type of the side data elements should not be affected
>>>>> by the problem described.
>>>>> Maybe we could leave that. Bugs could manifest as the absence or
>>>>> addition
>>>>> of side data, seeing that in framecrc_write_packet() output may be
>>>>> usefull
>>>>
>>>> No strong opinion here - patches welcome I guess.
>>>
>>> I can do it, but it will be a "breaking" change, assuming there are
>>> parsers
>>> that read the output of this muxer.
>>
>> does anyone know of such parsers ?
> 
> No, it's hypothetical.
> 
>> or does anyone have an idea what such parser could be used for ?
> 
> Users that can't or don't want to write programs using the libraries and
> find it easier to write perl scripts that parse the output of CLI like
> ffmpeg and ffprobe.
> 
> Technically speaking, many of our regression tests do exactly that.
> 
>>
>>
>>> Right now you removed all the trailing properties, which while also
>>> breaking, a sane parser made for the old output can simply assume
>>> that the
>>> line was truncated. But if we re-add the side data amount and sizes
>>> for each
>>> of them without the hashes, things can get parsed the wrong way.
>>>
>>> Namely, it used to be:
>>>> 0,          0,          0,       16,    57008, 0x43416399,
>>>> S=2,        8, 0x08e5014f,       88, 0xd65a04db
>>>
>>> And now it will be something like:
>>>> 0,          0,          0,       16,    57008, 0x43416399,
>>>> S=2,        8,       88
>>>
>>> So the question is, do we care about this? The framehash/framemd5 muxer
>>> prints a version number, which lets us make breaking additions
>>> parsers can
>>> then properly handle. Should we then just consider that parsing framecrc
>>> output is not a supported scenario?
>>
>> the version should probably be increased
> 
> framemd5/framehash != framecrc. The former is versioned, but the latter,
> which this discussion is about, is not, so we should decide if that
> means its output is to be considered fixed or not.
> 
> I'm inclined to say it shouldn't. There's framehash for a versioned
> output that's guaranteed to not change, which also supports adler32 (the
> algorithm used by framecrc).
> 

framehash btw uses it properly, whereas framecrc initializes the adler32
checksum to zero (it should be one). Last time I checked, switching FATE
to framehash (or making framecrc initialize the checksum to 1) would
amount to a diff of about 70000 lines, so I didn't do it.
Of course, framehash has the same problems with side-data hashing, but
it has a version option so that we can make changes.
If we decide to switch FATE to framehash, we should probably deprecate
framecrc. I could make this change.

- Andreas
Anton Khirnov May 14, 2021, 8:28 p.m. UTC | #7
Quoting James Almer (2021-05-14 14:42:10)
> On 5/14/2021 5:01 AM, Anton Khirnov wrote:
> > Quoting Michael Niedermayer (2021-05-10 16:06:01)
> >> On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
> >>> There are no guarantees that all side data types have the same
> >>> representation on all platforms.
> >>
> >>> @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
> >>>                pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
> >>>       if (pkt->flags != AV_PKT_FLAG_KEY)
> >>>           av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
> >>> -    if (pkt->side_data_elems) {
> >>> -        int i;
> >>> -        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
> >>
> >> The number and type of the side data elements should not be affected
> >> by the problem described.
> >> Maybe we could leave that. Bugs could manifest as the absence or addition
> >> of side data, seeing that in framecrc_write_packet() output may be usefull
> > 
> > No strong opinion here - patches welcome I guess.
> 
> I can do it, but it will be a "breaking" change, assuming there are 
> parsers that read the output of this muxer.

Imo frame* muxers are for testing purposes only and should not be
considered stable.
James Almer May 14, 2021, 8:36 p.m. UTC | #8
On 5/14/2021 5:28 PM, Anton Khirnov wrote:
> Quoting James Almer (2021-05-14 14:42:10)
>> On 5/14/2021 5:01 AM, Anton Khirnov wrote:
>>> Quoting Michael Niedermayer (2021-05-10 16:06:01)
>>>> On Sun, Apr 25, 2021 at 09:03:20AM +0200, Anton Khirnov wrote:
>>>>> There are no guarantees that all side data types have the same
>>>>> representation on all platforms.
>>>>
>>>>> @@ -65,63 +51,6 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
>>>>>                 pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
>>>>>        if (pkt->flags != AV_PKT_FLAG_KEY)
>>>>>            av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
>>>>> -    if (pkt->side_data_elems) {
>>>>> -        int i;
>>>>> -        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
>>>>
>>>> The number and type of the side data elements should not be affected
>>>> by the problem described.
>>>> Maybe we could leave that. Bugs could manifest as the absence or addition
>>>> of side data, seeing that in framecrc_write_packet() output may be usefull
>>>
>>> No strong opinion here - patches welcome I guess.
>>
>> I can do it, but it will be a "breaking" change, assuming there are
>> parsers that read the output of this muxer.
> 
> Imo frame* muxers are for testing purposes only and should not be
> considered stable.

Agree for framecrc as i mentioned in my other email, but framehash is 
versioned, so that one is stable.

Will send a patch to re-add side data amount of sizes to framecrc, then.
diff mbox series

Patch

diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 1fbe4aa4ee..863aedb7e8 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -21,10 +21,7 @@ 
 
 #include <inttypes.h>
 
-#include "config.h"
 #include "libavutil/adler32.h"
-#include "libavutil/avstring.h"
-#include "libavutil/intreadwrite.h"
 #include "libavcodec/avcodec.h"
 #include "avformat.h"
 #include "internal.h"
@@ -45,17 +42,6 @@  static int framecrc_write_header(struct AVFormatContext *s)
     return ff_framehash_write_header(s);
 }
 
-static av_unused void inline bswap(char *buf, int offset, int size)
-{
-    if (size == 8) {
-        uint64_t val = AV_RN64(buf + offset);
-        AV_WN64(buf + offset, av_bswap64(val));
-    } else if (size == 4) {
-        uint32_t val = AV_RN32(buf + offset);
-        AV_WN32(buf + offset, av_bswap32(val));
-    }
-}
-
 static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
 {
     uint32_t crc = av_adler32_update(0, pkt->data, pkt->size);
@@ -65,63 +51,6 @@  static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
              pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
     if (pkt->flags != AV_PKT_FLAG_KEY)
         av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
-    if (pkt->side_data_elems) {
-        int i;
-        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
-
-        for (i=0; i<pkt->side_data_elems; i++) {
-            const AVPacketSideData *const sd = &pkt->side_data[i];
-            const uint8_t *data = sd->data;
-            uint32_t side_data_crc = 0;
-
-            switch (sd->type) {
-#if HAVE_BIGENDIAN
-                uint8_t bswap_buf[FFMAX(sizeof(AVCPBProperties),
-                                        sizeof(AVProducerReferenceTime))];
-            case AV_PKT_DATA_PALETTE:
-            case AV_PKT_DATA_REPLAYGAIN:
-            case AV_PKT_DATA_DISPLAYMATRIX:
-            case AV_PKT_DATA_STEREO3D:
-            case AV_PKT_DATA_AUDIO_SERVICE_TYPE:
-            case AV_PKT_DATA_FALLBACK_TRACK:
-            case AV_PKT_DATA_MASTERING_DISPLAY_METADATA:
-            case AV_PKT_DATA_SPHERICAL:
-            case AV_PKT_DATA_CONTENT_LIGHT_LEVEL:
-            case AV_PKT_DATA_S12M_TIMECODE:
-                for (int j = 0; j < sd->size / 4; j++) {
-                    uint8_t buf[4];
-                    AV_WL32(buf, AV_RB32(sd->data + 4 * j));
-                    side_data_crc = av_adler32_update(side_data_crc, buf, 4);
-                }
-                break;
-            case AV_PKT_DATA_CPB_PROPERTIES:
-#define BSWAP(struct, field) bswap(bswap_buf, offsetof(struct, field), sizeof(((struct){0}).field))
-                if (sd->size == sizeof(AVCPBProperties)) {
-                    memcpy(bswap_buf, sd->data, sizeof(AVCPBProperties));
-                    data = bswap_buf;
-                    BSWAP(AVCPBProperties, max_bitrate);
-                    BSWAP(AVCPBProperties, min_bitrate);
-                    BSWAP(AVCPBProperties, avg_bitrate);
-                    BSWAP(AVCPBProperties, buffer_size);
-                    BSWAP(AVCPBProperties, vbv_delay);
-                }
-                goto pod;
-            case AV_PKT_DATA_PRFT:
-                if (sd->size == sizeof(AVProducerReferenceTime)) {
-                    memcpy(bswap_buf, sd->data, sizeof(AVProducerReferenceTime));
-                    data = bswap_buf;
-                    BSWAP(AVProducerReferenceTime, wallclock);
-                    BSWAP(AVProducerReferenceTime, flags);
-                }
-                goto pod;
-            pod:
-#endif
-            default:
-                side_data_crc = av_adler32_update(0, data, sd->size);
-            }
-            av_strlcatf(buf, sizeof(buf), ", %8d, 0x%08"PRIx32, pkt->side_data[i].size, side_data_crc);
-        }
-    }
     av_strlcatf(buf, sizeof(buf), "\n");
     avio_write(s->pb, buf, strlen(buf));
     return 0;
diff --git a/tests/ref/fate/copy-trac3074 b/tests/ref/fate/copy-trac3074
index 78b6015ae8..eea30be03d 100644
--- a/tests/ref/fate/copy-trac3074
+++ b/tests/ref/fate/copy-trac3074
@@ -6,7 +6,7 @@  da6122873fb83ce4340cf5d0ab8d475e *tests/data/fate/copy-trac3074.mp4
 #sample_rate 0: 48000
 #channel_layout 0: 3
 #channel_layout_name 0: stereo
-0,          0,          0,     1536,      512, 0x2beaf79f, S=1,        4, 0x00000000
+0,          0,          0,     1536,      512, 0x2beaf79f
 0,       1536,       1536,     1536,      512, 0x29ddf9d6
 0,       3072,       3072,     1536,      512, 0xba0afa79
 0,       4608,       4608,     1536,      512, 0xe019f394
diff --git a/tests/ref/fate/cover-art-mp3-id3v2-remux b/tests/ref/fate/cover-art-mp3-id3v2-remux
index 713ca9e951..d7aae5544d 100644
--- a/tests/ref/fate/cover-art-mp3-id3v2-remux
+++ b/tests/ref/fate/cover-art-mp3-id3v2-remux
@@ -21,7 +21,7 @@  c1b55a9a92226cd72d3f53ccd830d127 *tests/data/fate/cover-art-mp3-id3v2-remux.mp3
 #codec_id 3: png
 #dimensions 3: 263x263
 #sar 3: 1/1
-0,    -353590,    -353590,   368640,      417, 0x15848290, S=1,       10, 0x034e0055
+0,    -353590,    -353590,   368640,      417, 0x15848290
 1,          0,          0,        0,    15760, 0x71d5c418
 2,          0,          0,        0,   208350, 0x291b44d1
 3,          0,          0,        0,   165671, 0x7c1c8070
diff --git a/tests/ref/fate/gapless-mp3 b/tests/ref/fate/gapless-mp3
index ab4f1a0456..66a765ce7b 100644
--- a/tests/ref/fate/gapless-mp3
+++ b/tests/ref/fate/gapless-mp3
@@ -1,5 +1,5 @@ 
-44b42cc3a898b45507d856d0813f4f26 *tests/data/fate/gapless-mp3.out-1
+7b72a1f069386ca934a9537e7fcd63aa *tests/data/fate/gapless-mp3.out-1
 c96c3ae7bd3300fd2f4debac222de5b7
-ec876434ed65e338e07234e54d136caf *tests/data/fate/gapless-mp3.out-2
+31eddf7f5dbee1a4f35f2110e35007cc *tests/data/fate/gapless-mp3.out-2
 c96c3ae7bd3300fd2f4debac222de5b7
-806fd80eba887b46a1eba1eeff63df28 *tests/data/fate/gapless-mp3.out-3
+3836e06e588f6222597dae4b11d2fcf8 *tests/data/fate/gapless-mp3.out-3
diff --git a/tests/ref/fate/id3v2-priv-remux b/tests/ref/fate/id3v2-priv-remux
index 6a8b58f27e..aea6ee9a5f 100644
--- a/tests/ref/fate/id3v2-priv-remux
+++ b/tests/ref/fate/id3v2-priv-remux
@@ -6,7 +6,7 @@  bb2816e3a05ce136e9ac14479c1ebe24 *tests/data/fate/id3v2-priv-remux.mp3
 #sample_rate 0: 48000
 #channel_layout 0: 4
 #channel_layout_name 0: mono
-0,    -155528,    -155528,   338688,      192, 0x3774510e, S=1,       10, 0x00bc0013
+0,    -155528,    -155528,   338688,      192, 0x3774510e
 0,     183160,     183160,   338688,      192, 0x856c5b02
 0,     521848,     521848,   338688,      192, 0xb86e557f
 0,     860536,     860536,   338688,      192, 0x3b6c5cb7
diff --git a/tests/ref/fate/matroska-mastering-display-metadata b/tests/ref/fate/matroska-mastering-display-metadata
index f9fb54abbf..6eb4a3d515 100644
--- a/tests/ref/fate/matroska-mastering-display-metadata
+++ b/tests/ref/fate/matroska-mastering-display-metadata
@@ -24,9 +24,9 @@ 
 #codec_id 3: ffv1
 #dimensions 3: 1280x720
 #sar 3: 1/1
-0,          0,          0,       16,    57008, 0x43416399, S=2,        8, 0x08e5014f,       88, 0xd65a04db
+0,          0,          0,       16,    57008, 0x43416399
 1,          0,          0,       16,     2403, 0xaa818522
-3,          0,          0,       16,   274117, 0xc439610f, S=2,        8, 0x08e5014f,       88, 0xd65a04db
+3,          0,          0,       16,   274117, 0xc439610f
 0,         17,         17,       16,    57248, 0xa06cd7b5
 1,         17,         17,       16,     2403, 0xe1a991e5
 2,         17,         17,       16,     1602, 0x5d868171
diff --git a/tests/ref/fate/matroska-spherical-mono-remux b/tests/ref/fate/matroska-spherical-mono-remux
index e0e5f40aa9..cce9b3874a 100644
--- a/tests/ref/fate/matroska-spherical-mono-remux
+++ b/tests/ref/fate/matroska-spherical-mono-remux
@@ -12,8 +12,8 @@ 
 #codec_id 1: h264
 #dimensions 1: 1920x1080
 #sar 1: 0/1
-0,        -80,          0,       40,    69118, 0x73cb52f0, S=2,       12, 0x00000000,       36, 0x2cf8035c
-1,        -80,          0,       40,    69118, 0x73cb52f0, S=2,       12, 0x00000000,       36, 0x2cf8035c
+0,        -80,          0,       40,    69118, 0x73cb52f0
+1,        -80,          0,       40,    69118, 0x73cb52f0
 0,        -40,        160,       40,     1103, 0x082a059f, F=0x0
 1,        -40,        160,       40,     1103, 0x082a059f, F=0x0
 [STREAM]
diff --git a/tests/ref/fate/matroska-vp8-alpha-remux b/tests/ref/fate/matroska-vp8-alpha-remux
index d8471c6cbf..1209c85984 100644
--- a/tests/ref/fate/matroska-vp8-alpha-remux
+++ b/tests/ref/fate/matroska-vp8-alpha-remux
@@ -5,13 +5,13 @@  d06be833da8e8d9d00bf334e0dfe8a58 *tests/data/fate/matroska-vp8-alpha-remux.matro
 #codec_id 0: vp8
 #dimensions 0: 320x213
 #sar 0: 1/1
-0,          0,          0,       33,     2108, 0x59b92a34, S=2,     1900, 0x8fb3adc5,       12, 0x00000000
-0,         32,         32,       33,      142, 0x2f2a3fed, F=0x0, S=1,      160, 0xa13346af
-0,         65,         65,       33,      157, 0x17804767, F=0x0, S=1,      209, 0x64115f15
-0,         99,         99,       33,      206, 0x537262ca, F=0x0, S=1,      317, 0x44a09dd0
-0,        132,        132,       33,      259, 0x73ff74b6, F=0x0, S=1,      384, 0x2ee2c588
-0,        165,        165,       33,      320, 0x0fcf8ce4, F=0x0, S=1,      415, 0xff68c953
-0,        199,        199,       33,      377, 0x8fffb5f5, F=0x0, S=1,      475, 0x4166f3eb
+0,          0,          0,       33,     2108, 0x59b92a34
+0,         32,         32,       33,      142, 0x2f2a3fed, F=0x0
+0,         65,         65,       33,      157, 0x17804767, F=0x0
+0,         99,         99,       33,      206, 0x537262ca, F=0x0
+0,        132,        132,       33,      259, 0x73ff74b6, F=0x0
+0,        165,        165,       33,      320, 0x0fcf8ce4, F=0x0
+0,        199,        199,       33,      377, 0x8fffb5f5, F=0x0
 [STREAM]
 DISPOSITION:default=1
 DISPOSITION:dub=0
diff --git a/tests/ref/fate/mov-cover-image b/tests/ref/fate/mov-cover-image
index e65e4ee36f..4388127c03 100644
--- a/tests/ref/fate/mov-cover-image
+++ b/tests/ref/fate/mov-cover-image
@@ -17,7 +17,7 @@ 
 #codec_id 2: png
 #dimensions 2: 600x600
 #sar 2: 1/1
-0,      -2112,      -2112,     1024,        6, 0x027e00e8, F=0x5, S=1,       10, 0x02c80048
+0,      -2112,      -2112,     1024,        6, 0x027e00e8, F=0x5
 0,      -1088,      -1088,     1024,        6, 0x027e00e8, F=0x5
 0,        -64,        -64,     1024,        6, 0x027e00e8
 1,          0,          0,        0,    25441, 0xe82503b0
diff --git a/tests/ref/fate/mxf-d10-user-comments b/tests/ref/fate/mxf-d10-user-comments
index 13761fb0ce..75d6172ae2 100644
--- a/tests/ref/fate/mxf-d10-user-comments
+++ b/tests/ref/fate/mxf-d10-user-comments
@@ -6,7 +6,7 @@ 
 #codec_id 0: mpeg2video
 #dimensions 0: 1280x720
 #sar 0: 3/4
-0,         -1,          0,        1,   150000, 0x0547870d, S=1,       24, 0x5aa90ad0
+0,         -1,          0,        1,   150000, 0x0547870d
 0,          0,          1,        1,   150000, 0xe80a1612, F=0x0
 0,          1,          2,        1,   150000, 0xc5c50e2f, F=0x0
 0,          2,          3,        1,   150000, 0x51e28a04, F=0x0
diff --git a/tests/ref/fate/segment-mp4-to-ts b/tests/ref/fate/segment-mp4-to-ts
index dfefb0af20..c5ea8e62e5 100644
--- a/tests/ref/fate/segment-mp4-to-ts
+++ b/tests/ref/fate/segment-mp4-to-ts
@@ -4,129 +4,129 @@ 
 #codec_id 0: h264
 #dimensions 0: 640x360
 #sar 0: 1/1
-0,      -7200,          0,     3600,    22630, 0x9b109541, S=1,        1, 0x00e000e0
-0,      -3600,      14400,     3600,     4021, 0xbf7cdb02, F=0x0, S=1,        1, 0x00e000e0
-0,          0,       7200,     3600,     1096, 0x4f162690, F=0x0, S=1,        1, 0x00e000e0
-0,       3600,       3600,     3600,      687, 0x00394b95, F=0x0, S=1,        1, 0x00e000e0
-0,       7200,      10800,     3600,      445, 0x08c3d065, F=0x0, S=1,        1, 0x00e000e0
-0,      10800,      28800,     3600,     4212, 0x56d12b8f, F=0x0, S=1,        1, 0x00e000e0
-0,      14400,      21600,     3600,     1117, 0xd521260b, F=0x0, S=1,        1, 0x00e000e0
-0,      18000,      18000,     3600,      892, 0x4262bdbc, F=0x0, S=1,        1, 0x00e000e0
-0,      21600,      25200,     3600,      480, 0x3be1ef0b, F=0x0, S=1,        1, 0x00e000e0
-0,      25200,      43200,     3600,     4065, 0x40dee237, F=0x0, S=1,        1, 0x00e000e0
-0,      28800,      36000,     3600,      962, 0x31a4ceb1, F=0x0, S=1,        1, 0x00e000e0
-0,      32400,      32400,     3600,      651, 0xb2aa317a, F=0x0, S=1,        1, 0x00e000e0
-0,      36000,      39600,     3600,      543, 0x9c4e0024, F=0x0, S=1,        1, 0x00e000e0
-0,      39600,      57600,     3600,     4221, 0x77c23977, F=0x0, S=1,        1, 0x00e000e0
-0,      43200,      50400,     3600,     1040, 0x482cfa34, F=0x0, S=1,        1, 0x00e000e0
-0,      46800,      46800,     3600,      576, 0x2686136a, F=0x0, S=1,        1, 0x00e000e0
-0,      50400,      54000,     3600,      607, 0xc53c2339, F=0x0, S=1,        1, 0x00e000e0
-0,      54000,      72000,     3600,     4755, 0x2f642b58, F=0x0, S=1,        1, 0x00e000e0
-0,      57600,      64800,     3600,     1182, 0xbe1a4847, F=0x0, S=1,        1, 0x00e000e0
-0,      61200,      61200,     3600,      809, 0x8d948a4e, F=0x0, S=1,        1, 0x00e000e0
-0,      64800,      68400,     3600,      656, 0x4fa03c2b, F=0x0, S=1,        1, 0x00e000e0
-0,      68400,      86400,     3600,    26555, 0x5629b584, S=1,        1, 0x00e000e0
-0,      72000,      79200,     3600,     1141, 0x761b31e8, F=0x0, S=1,        1, 0x00e000e0
-0,      75600,      75600,     3600,      717, 0x57746351, F=0x0, S=1,        1, 0x00e000e0
-0,      79200,      82800,     3600,      693, 0x78b24263, F=0x0, S=1,        1, 0x00e000e0
-0,      82800,     100800,     3600,     3417, 0x560dbc89, F=0x0, S=1,        1, 0x00e000e0
-0,      86400,      93600,     3600,     1128, 0xc0f1383c, F=0x0, S=1,        1, 0x00e000e0
-0,      90000,      90000,     3600,      650, 0xc3ad485e, F=0x0, S=1,        1, 0x00e000e0
-0,      93600,      97200,     3600,      766, 0xd3e9757d, F=0x0, S=1,        1, 0x00e000e0
-0,      97200,     115200,     3600,     4268, 0xec1235b5, F=0x0, S=1,        1, 0x00e000e0
-0,     100800,     108000,     3600,     1119, 0x65f51fb7, F=0x0, S=1,        1, 0x00e000e0
-0,     104400,     104400,     3600,      766, 0x213b78d3, F=0x0, S=1,        1, 0x00e000e0
-0,     108000,     111600,     3600,      770, 0xa7537e6d, F=0x0, S=1,        1, 0x00e000e0
-0,     111600,     129600,     3600,     6349, 0xec225cf9, F=0x0, S=1,        1, 0x00e000e0
-0,     115200,     122400,     3600,     1188, 0x9dea396c, F=0x0, S=1,        1, 0x00e000e0
-0,     118800,     118800,     3600,      805, 0xdd9e88d0, F=0x0, S=1,        1, 0x00e000e0
-0,     122400,     126000,     3600,      752, 0x1f93730a, F=0x0, S=1,        1, 0x00e000e0
-0,     126000,     144000,     3600,     5502, 0x501bda5c, F=0x0, S=1,        1, 0x00e000e0
-0,     129600,     136800,     3600,     1240, 0x7e3661ea, F=0x0, S=1,        1, 0x00e000e0
-0,     133200,     133200,     3600,      830, 0xa8249f38, F=0x0, S=1,        1, 0x00e000e0
-0,     136800,     140400,     3600,      754, 0xab1c815e, F=0x0, S=1,        1, 0x00e000e0
-0,     140400,     158400,     3600,     5328, 0xd2c55ac6, F=0x0, S=1,        1, 0x00e000e0
-0,     144000,     151200,     3600,     1271, 0x46006870, F=0x0, S=1,        1, 0x00e000e0
-0,     147600,     147600,     3600,      849, 0x94dc99c7, F=0x0, S=1,        1, 0x00e000e0
-0,     151200,     154800,     3600,      753, 0xf4236cab, F=0x0, S=1,        1, 0x00e000e0
-0,     154800,     172800,     3600,    25825, 0xd5464dee, S=1,        1, 0x00e000e0
-0,     158400,     165600,     3600,     1206, 0x8ce84344, F=0x0, S=1,        1, 0x00e000e0
-0,     162000,     162000,     3600,      867, 0x312fa07d, F=0x0, S=1,        1, 0x00e000e0
-0,     165600,     169200,     3600,      719, 0x810666d1, F=0x0, S=1,        1, 0x00e000e0
-0,     169200,     187200,     3600,     3786, 0xa96a6825, F=0x0, S=1,        1, 0x00e000e0
-0,     172800,     180000,     3600,     1187, 0x77e649a2, F=0x0, S=1,        1, 0x00e000e0
-0,     176400,     176400,     3600,      750, 0x86da6d2e, F=0x0, S=1,        1, 0x00e000e0
-0,     180000,     183600,     3600,      815, 0xf09a9881, F=0x0, S=1,        1, 0x00e000e0
-0,     183600,     201600,     3600,     5275, 0xee3450bb, F=0x0, S=1,        1, 0x00e000e0
-0,     187200,     194400,     3600,     1352, 0x150a96e1, F=0x0, S=1,        1, 0x00e000e0
-0,     190800,     190800,     3600,      877, 0x6062a120, F=0x0, S=1,        1, 0x00e000e0
-0,     194400,     198000,     3600,      829, 0x5180988c, F=0x0, S=1,        1, 0x00e000e0
-0,     198000,     216000,     3600,     4421, 0x623aad33, F=0x0, S=1,        1, 0x00e000e0
-0,     201600,     208800,     3600,     1464, 0xd34dc851, F=0x0, S=1,        1, 0x00e000e0
-0,     205200,     205200,     3600,      903, 0xf63bbed0, F=0x0, S=1,        1, 0x00e000e0
-0,     208800,     212400,     3600,      717, 0xc17054b8, F=0x0, S=1,        1, 0x00e000e0
-0,     212400,     230400,     3600,     4787, 0x75e9400e, F=0x0, S=1,        1, 0x00e000e0
-0,     216000,     223200,     3600,     1435, 0xb01ccabb, F=0x0, S=1,        1, 0x00e000e0
-0,     219600,     219600,     3600,      851, 0x54bda291, F=0x0, S=1,        1, 0x00e000e0
-0,     223200,     226800,     3600,      809, 0x84e37fee, F=0x0, S=1,        1, 0x00e000e0
-0,     226800,     244800,     3600,     4541, 0xd4e5c0de, F=0x0, S=1,        1, 0x00e000e0
-0,     230400,     237600,     3600,     1545, 0x0099fc98, F=0x0, S=1,        1, 0x00e000e0
-0,     234000,     234000,     3600,      929, 0xfd72d049, F=0x0, S=1,        1, 0x00e000e0
-0,     237600,     241200,     3600,      829, 0xcfda9e96, F=0x0, S=1,        1, 0x00e000e0
-0,     241200,     259200,     3600,    24220, 0x5ca21d71, S=1,        1, 0x00e000e0
-0,     244800,     252000,     3600,     1422, 0xcde6cc34, F=0x0, S=1,        1, 0x00e000e0
-0,     248400,     248400,     3600,      883, 0xedacbe25, F=0x0, S=1,        1, 0x00e000e0
-0,     252000,     255600,     3600,      768, 0x89d774bc, F=0x0, S=1,        1, 0x00e000e0
-0,     255600,     273600,     3600,     3802, 0xea1d70d4, F=0x0, S=1,        1, 0x00e000e0
-0,     259200,     266400,     3600,     1284, 0x2c927097, F=0x0, S=1,        1, 0x00e000e0
-0,     262800,     262800,     3600,      745, 0x81076a7f, F=0x0, S=1,        1, 0x00e000e0
-0,     266400,     270000,     3600,      931, 0x3675dbfe, F=0x0, S=1,        1, 0x00e000e0
-0,     270000,     288000,     3600,     4830, 0x7a807a68, F=0x0, S=1,        1, 0x00e000e0
-0,     273600,     280800,     3600,     1446, 0x6224bc81, F=0x0, S=1,        1, 0x00e000e0
-0,     277200,     277200,     3600,      833, 0x56f78ae2, F=0x0, S=1,        1, 0x00e000e0
-0,     280800,     284400,     3600,      873, 0x9caeaf00, F=0x0, S=1,        1, 0x00e000e0
-0,     284400,     302400,     3600,     5167, 0x1703151f, F=0x0, S=1,        1, 0x00e000e0
-0,     288000,     295200,     3600,     1449, 0x0881b0d6, F=0x0, S=1,        1, 0x00e000e0
-0,     291600,     291600,     3600,      866, 0x0bffa719, F=0x0, S=1,        1, 0x00e000e0
-0,     295200,     298800,     3600,      874, 0xc243a65f, F=0x0, S=1,        1, 0x00e000e0
-0,     298800,     316800,     3600,     5426, 0x7c899c30, F=0x0, S=1,        1, 0x00e000e0
-0,     302400,     309600,     3600,     1574, 0x03b00f0d, F=0x0, S=1,        1, 0x00e000e0
-0,     306000,     306000,     3600,      860, 0x65cea74e, F=0x0, S=1,        1, 0x00e000e0
-0,     309600,     313200,     3600,      829, 0xffd795cd, F=0x0, S=1,        1, 0x00e000e0
-0,     313200,     331200,     3600,     5352, 0x59997996, F=0x0, S=1,        1, 0x00e000e0
-0,     316800,     324000,     3600,     1501, 0xb3b8f001, F=0x0, S=1,        1, 0x00e000e0
-0,     320400,     320400,     3600,      941, 0x92b0cb18, F=0x0, S=1,        1, 0x00e000e0
-0,     324000,     327600,     3600,      823, 0x3d548355, F=0x0, S=1,        1, 0x00e000e0
-0,     327600,     345600,     3600,    24042, 0x441e94fb, S=1,        1, 0x00e000e0
-0,     331200,     338400,     3600,     1582, 0x4f5d1049, F=0x0, S=1,        1, 0x00e000e0
-0,     334800,     334800,     3600,      945, 0x4f3cc9e8, F=0x0, S=1,        1, 0x00e000e0
-0,     338400,     342000,     3600,      815, 0x0ca790a4, F=0x0, S=1,        1, 0x00e000e0
-0,     342000,     360000,     3600,     4425, 0x1db2a088, F=0x0, S=1,        1, 0x00e000e0
-0,     345600,     352800,     3600,     1492, 0x881ce798, F=0x0, S=1,        1, 0x00e000e0
-0,     349200,     349200,     3600,      905, 0xbdd9c278, F=0x0, S=1,        1, 0x00e000e0
-0,     352800,     356400,     3600,      870, 0x64fbb0e1, F=0x0, S=1,        1, 0x00e000e0
-0,     356400,     374400,     3600,     5194, 0x138b1e1d, F=0x0, S=1,        1, 0x00e000e0
-0,     360000,     367200,     3600,     1483, 0xc5c9d717, F=0x0, S=1,        1, 0x00e000e0
-0,     363600,     363600,     3600,      977, 0x3648d9fc, F=0x0, S=1,        1, 0x00e000e0
-0,     367200,     370800,     3600,      834, 0x6c5d8969, F=0x0, S=1,        1, 0x00e000e0
-0,     370800,     388800,     3600,     6956, 0x6a548e0b, F=0x0, S=1,        1, 0x00e000e0
-0,     374400,     381600,     3600,     1187, 0x795f4163, F=0x0, S=1,        1, 0x00e000e0
-0,     378000,     378000,     3600,      925, 0x92bfc2fb, F=0x0, S=1,        1, 0x00e000e0
-0,     381600,     385200,     3600,      747, 0xea9978fc, F=0x0, S=1,        1, 0x00e000e0
-0,     385200,     403200,     3600,     5005, 0xc558c189, F=0x0, S=1,        1, 0x00e000e0
-0,     388800,     396000,     3600,      452, 0x7d92d9d8, F=0x0, S=1,        1, 0x00e000e0
-0,     392400,     392400,     3600,      784, 0xfd597a5f, F=0x0, S=1,        1, 0x00e000e0
-0,     396000,     399600,     3600,      199, 0x79b06355, F=0x0, S=1,        1, 0x00e000e0
-0,     399600,     417600,     3600,     1862, 0x22a2a06c, F=0x0, S=1,        1, 0x00e000e0
-0,     403200,     410400,     3600,      359, 0x11bdae52, F=0x0, S=1,        1, 0x00e000e0
-0,     406800,     406800,     3600,      235, 0xbec26964, F=0x0, S=1,        1, 0x00e000e0
-0,     410400,     414000,     3600,      221, 0x8380682c, F=0x0, S=1,        1, 0x00e000e0
-0,     414000,     432000,     3600,    22588, 0xf0ecf072, S=1,        1, 0x00e000e0
-0,     417600,     424800,     3600,      383, 0x4f3bb571, F=0x0, S=1,        1, 0x00e000e0
-0,     421200,     421200,     3600,      257, 0x22e87802, F=0x0, S=1,        1, 0x00e000e0
-0,     424800,     428400,     3600,      261, 0xdb988134, F=0x0, S=1,        1, 0x00e000e0
-0,     428400,     435600,     3600,      156, 0xd2c3406c, F=0x0, S=1,        1, 0x00e000e0
-0,     432000,     439200,     3600,      330, 0x150d9b60, F=0x0, S=1,        1, 0x00e000e0
-0,     435600,     446400,     3600,      324, 0x558194ee, F=0x0, S=1,        1, 0x00e000e0
-0,     439200,     442800,     3600,      191, 0x108e54d1, F=0x0, S=1,        1, 0x00e000e0
+0,      -7200,          0,     3600,    22630, 0x9b109541
+0,      -3600,      14400,     3600,     4021, 0xbf7cdb02, F=0x0
+0,          0,       7200,     3600,     1096, 0x4f162690, F=0x0
+0,       3600,       3600,     3600,      687, 0x00394b95, F=0x0
+0,       7200,      10800,     3600,      445, 0x08c3d065, F=0x0
+0,      10800,      28800,     3600,     4212, 0x56d12b8f, F=0x0
+0,      14400,      21600,     3600,     1117, 0xd521260b, F=0x0
+0,      18000,      18000,     3600,      892, 0x4262bdbc, F=0x0
+0,      21600,      25200,     3600,      480, 0x3be1ef0b, F=0x0
+0,      25200,      43200,     3600,     4065, 0x40dee237, F=0x0
+0,      28800,      36000,     3600,      962, 0x31a4ceb1, F=0x0
+0,      32400,      32400,     3600,      651, 0xb2aa317a, F=0x0
+0,      36000,      39600,     3600,      543, 0x9c4e0024, F=0x0
+0,      39600,      57600,     3600,     4221, 0x77c23977, F=0x0
+0,      43200,      50400,     3600,     1040, 0x482cfa34, F=0x0
+0,      46800,      46800,     3600,      576, 0x2686136a, F=0x0
+0,      50400,      54000,     3600,      607, 0xc53c2339, F=0x0
+0,      54000,      72000,     3600,     4755, 0x2f642b58, F=0x0
+0,      57600,      64800,     3600,     1182, 0xbe1a4847, F=0x0
+0,      61200,      61200,     3600,      809, 0x8d948a4e, F=0x0
+0,      64800,      68400,     3600,      656, 0x4fa03c2b, F=0x0
+0,      68400,      86400,     3600,    26555, 0x5629b584
+0,      72000,      79200,     3600,     1141, 0x761b31e8, F=0x0
+0,      75600,      75600,     3600,      717, 0x57746351, F=0x0
+0,      79200,      82800,     3600,      693, 0x78b24263, F=0x0
+0,      82800,     100800,     3600,     3417, 0x560dbc89, F=0x0
+0,      86400,      93600,     3600,     1128, 0xc0f1383c, F=0x0
+0,      90000,      90000,     3600,      650, 0xc3ad485e, F=0x0
+0,      93600,      97200,     3600,      766, 0xd3e9757d, F=0x0
+0,      97200,     115200,     3600,     4268, 0xec1235b5, F=0x0
+0,     100800,     108000,     3600,     1119, 0x65f51fb7, F=0x0
+0,     104400,     104400,     3600,      766, 0x213b78d3, F=0x0
+0,     108000,     111600,     3600,      770, 0xa7537e6d, F=0x0
+0,     111600,     129600,     3600,     6349, 0xec225cf9, F=0x0
+0,     115200,     122400,     3600,     1188, 0x9dea396c, F=0x0
+0,     118800,     118800,     3600,      805, 0xdd9e88d0, F=0x0
+0,     122400,     126000,     3600,      752, 0x1f93730a, F=0x0
+0,     126000,     144000,     3600,     5502, 0x501bda5c, F=0x0
+0,     129600,     136800,     3600,     1240, 0x7e3661ea, F=0x0
+0,     133200,     133200,     3600,      830, 0xa8249f38, F=0x0
+0,     136800,     140400,     3600,      754, 0xab1c815e, F=0x0
+0,     140400,     158400,     3600,     5328, 0xd2c55ac6, F=0x0
+0,     144000,     151200,     3600,     1271, 0x46006870, F=0x0
+0,     147600,     147600,     3600,      849, 0x94dc99c7, F=0x0
+0,     151200,     154800,     3600,      753, 0xf4236cab, F=0x0
+0,     154800,     172800,     3600,    25825, 0xd5464dee
+0,     158400,     165600,     3600,     1206, 0x8ce84344, F=0x0
+0,     162000,     162000,     3600,      867, 0x312fa07d, F=0x0
+0,     165600,     169200,     3600,      719, 0x810666d1, F=0x0
+0,     169200,     187200,     3600,     3786, 0xa96a6825, F=0x0
+0,     172800,     180000,     3600,     1187, 0x77e649a2, F=0x0
+0,     176400,     176400,     3600,      750, 0x86da6d2e, F=0x0
+0,     180000,     183600,     3600,      815, 0xf09a9881, F=0x0
+0,     183600,     201600,     3600,     5275, 0xee3450bb, F=0x0
+0,     187200,     194400,     3600,     1352, 0x150a96e1, F=0x0
+0,     190800,     190800,     3600,      877, 0x6062a120, F=0x0
+0,     194400,     198000,     3600,      829, 0x5180988c, F=0x0
+0,     198000,     216000,     3600,     4421, 0x623aad33, F=0x0
+0,     201600,     208800,     3600,     1464, 0xd34dc851, F=0x0
+0,     205200,     205200,     3600,      903, 0xf63bbed0, F=0x0
+0,     208800,     212400,     3600,      717, 0xc17054b8, F=0x0
+0,     212400,     230400,     3600,     4787, 0x75e9400e, F=0x0
+0,     216000,     223200,     3600,     1435, 0xb01ccabb, F=0x0
+0,     219600,     219600,     3600,      851, 0x54bda291, F=0x0
+0,     223200,     226800,     3600,      809, 0x84e37fee, F=0x0
+0,     226800,     244800,     3600,     4541, 0xd4e5c0de, F=0x0
+0,     230400,     237600,     3600,     1545, 0x0099fc98, F=0x0
+0,     234000,     234000,     3600,      929, 0xfd72d049, F=0x0
+0,     237600,     241200,     3600,      829, 0xcfda9e96, F=0x0
+0,     241200,     259200,     3600,    24220, 0x5ca21d71
+0,     244800,     252000,     3600,     1422, 0xcde6cc34, F=0x0
+0,     248400,     248400,     3600,      883, 0xedacbe25, F=0x0
+0,     252000,     255600,     3600,      768, 0x89d774bc, F=0x0
+0,     255600,     273600,     3600,     3802, 0xea1d70d4, F=0x0
+0,     259200,     266400,     3600,     1284, 0x2c927097, F=0x0
+0,     262800,     262800,     3600,      745, 0x81076a7f, F=0x0
+0,     266400,     270000,     3600,      931, 0x3675dbfe, F=0x0
+0,     270000,     288000,     3600,     4830, 0x7a807a68, F=0x0
+0,     273600,     280800,     3600,     1446, 0x6224bc81, F=0x0
+0,     277200,     277200,     3600,      833, 0x56f78ae2, F=0x0
+0,     280800,     284400,     3600,      873, 0x9caeaf00, F=0x0
+0,     284400,     302400,     3600,     5167, 0x1703151f, F=0x0
+0,     288000,     295200,     3600,     1449, 0x0881b0d6, F=0x0
+0,     291600,     291600,     3600,      866, 0x0bffa719, F=0x0
+0,     295200,     298800,     3600,      874, 0xc243a65f, F=0x0
+0,     298800,     316800,     3600,     5426, 0x7c899c30, F=0x0
+0,     302400,     309600,     3600,     1574, 0x03b00f0d, F=0x0
+0,     306000,     306000,     3600,      860, 0x65cea74e, F=0x0
+0,     309600,     313200,     3600,      829, 0xffd795cd, F=0x0
+0,     313200,     331200,     3600,     5352, 0x59997996, F=0x0
+0,     316800,     324000,     3600,     1501, 0xb3b8f001, F=0x0
+0,     320400,     320400,     3600,      941, 0x92b0cb18, F=0x0
+0,     324000,     327600,     3600,      823, 0x3d548355, F=0x0
+0,     327600,     345600,     3600,    24042, 0x441e94fb
+0,     331200,     338400,     3600,     1582, 0x4f5d1049, F=0x0
+0,     334800,     334800,     3600,      945, 0x4f3cc9e8, F=0x0
+0,     338400,     342000,     3600,      815, 0x0ca790a4, F=0x0
+0,     342000,     360000,     3600,     4425, 0x1db2a088, F=0x0
+0,     345600,     352800,     3600,     1492, 0x881ce798, F=0x0
+0,     349200,     349200,     3600,      905, 0xbdd9c278, F=0x0
+0,     352800,     356400,     3600,      870, 0x64fbb0e1, F=0x0
+0,     356400,     374400,     3600,     5194, 0x138b1e1d, F=0x0
+0,     360000,     367200,     3600,     1483, 0xc5c9d717, F=0x0
+0,     363600,     363600,     3600,      977, 0x3648d9fc, F=0x0
+0,     367200,     370800,     3600,      834, 0x6c5d8969, F=0x0
+0,     370800,     388800,     3600,     6956, 0x6a548e0b, F=0x0
+0,     374400,     381600,     3600,     1187, 0x795f4163, F=0x0
+0,     378000,     378000,     3600,      925, 0x92bfc2fb, F=0x0
+0,     381600,     385200,     3600,      747, 0xea9978fc, F=0x0
+0,     385200,     403200,     3600,     5005, 0xc558c189, F=0x0
+0,     388800,     396000,     3600,      452, 0x7d92d9d8, F=0x0
+0,     392400,     392400,     3600,      784, 0xfd597a5f, F=0x0
+0,     396000,     399600,     3600,      199, 0x79b06355, F=0x0
+0,     399600,     417600,     3600,     1862, 0x22a2a06c, F=0x0
+0,     403200,     410400,     3600,      359, 0x11bdae52, F=0x0
+0,     406800,     406800,     3600,      235, 0xbec26964, F=0x0
+0,     410400,     414000,     3600,      221, 0x8380682c, F=0x0
+0,     414000,     432000,     3600,    22588, 0xf0ecf072
+0,     417600,     424800,     3600,      383, 0x4f3bb571, F=0x0
+0,     421200,     421200,     3600,      257, 0x22e87802, F=0x0
+0,     424800,     428400,     3600,      261, 0xdb988134, F=0x0
+0,     428400,     435600,     3600,      156, 0xd2c3406c, F=0x0
+0,     432000,     439200,     3600,      330, 0x150d9b60, F=0x0
+0,     435600,     446400,     3600,      324, 0x558194ee, F=0x0
+0,     439200,     442800,     3600,      191, 0x108e54d1, F=0x0
 0,     442800,     450000,     3600,      233, 0xac5b6486, F=0x0
diff --git a/tests/ref/fate/webm-webvtt-remux b/tests/ref/fate/webm-webvtt-remux
index a0e9182f47..802a8f4226 100644
--- a/tests/ref/fate/webm-webvtt-remux
+++ b/tests/ref/fate/webm-webvtt-remux
@@ -16,20 +16,20 @@  c5625f28e6968e12d91f125edef5f16c *tests/data/fate/webm-webvtt-remux.webm
 1,      18000,      18000,     2000,       51, 0xc84211f5
 0,      20000,      20000,     2000,       67, 0x3e2918c7
 1,      20000,      20000,     2000,       67, 0x3e2918c7
-0,      22000,      22000,     2000,       29, 0x93f7098d, S=1,        3, 0x012a0096
-1,      22000,      22000,     2000,       29, 0x93f7098d, S=1,        3, 0x012a0096
+0,      22000,      22000,     2000,       29, 0x93f7098d
+1,      22000,      22000,     2000,       29, 0x93f7098d
 0,      24000,      24000,     2000,       49, 0xb2d91196
 1,      24000,      24000,     2000,       49, 0xb2d91196
-0,      27000,      27000,     3000,       99, 0xb750231a, S=1,       14, 0x292a0588
-1,      27000,      27000,     3000,       99, 0xb750231a, S=1,       14, 0x292a0588
-0,      30000,      30000,     1500,       36, 0xe7f70d87, S=1,       18, 0x3f63061b
-1,      30000,      30000,     1500,       36, 0xe7f70d87, S=1,       18, 0x3f63061b
-0,      30500,      30500,     2000,      112, 0x6961267d, S=1,       20, 0x50b70712
-1,      30500,      30500,     2000,      112, 0x6961267d, S=1,       20, 0x50b70712
-0,      32000,      32000,     3500,       58, 0x32d11382, S=1,       18, 0x3f63061b
-1,      32000,      32000,     3500,       58, 0x32d11382, S=1,       18, 0x3f63061b
-0,      32500,      32500,     1000,       36, 0xe6650c7c, S=1,       20, 0x47000712
-1,      32500,      32500,     1000,       36, 0xe6650c7c, S=1,       20, 0x47000712
+0,      27000,      27000,     3000,       99, 0xb750231a
+1,      27000,      27000,     3000,       99, 0xb750231a
+0,      30000,      30000,     1500,       36, 0xe7f70d87
+1,      30000,      30000,     1500,       36, 0xe7f70d87
+0,      30500,      30500,     2000,      112, 0x6961267d
+1,      30500,      30500,     2000,      112, 0x6961267d
+0,      32000,      32000,     3500,       58, 0x32d11382
+1,      32000,      32000,     3500,       58, 0x32d11382
+0,      32500,      32500,     1000,       36, 0xe6650c7c
+1,      32500,      32500,     1000,       36, 0xe6650c7c
 0,      35500,      35500,     2500,       73, 0xb13f19c0
 1,      35500,      35500,     2500,       73, 0xb13f19c0
 0,      50000,      50000,     1134,       43, 0x534b0ee3