[FFmpeg-cvslog] ffmpeg: rewrite setting the stream disposition

Anton Khirnov git at videolan.org
Tue Nov 16 12:06:13 EET 2021


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Nov 12 17:22:57 2021 +0100| [bd55552d692254b53504357c6987eea976cff4f9] | committer: Anton Khirnov

ffmpeg: rewrite setting the stream disposition

Currently, the code doing this is spread over several places and may
behave in unexpected ways. E.g. automatic 'default' marking is only done
for streams fed by complex filtergraphs. It is also applied in the order
in which the output streams are initialized, which is effectively
random.

Move processing the dispositions at the end of open_output_file(), when
we already have all the necessary information.

Apply the automatic default marking only if no explicit -disposition
options were supplied by the user, and apply it to the first stream of
each type (excluding attached pics) when there is more than one stream
of that type and no default markings were copied from the input streams.

Explicitly document the new behavior.

Changes the results of some tests, where the output file gets a default
disposition, while it previously did not.

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

 doc/ffmpeg.texi                                    | 37 +++++------
 fftools/ffmpeg.c                                   | 35 +----------
 fftools/ffmpeg_opt.c                               | 72 ++++++++++++++++++++++
 tests/ref/fate/ffprobe_compact                     | 60 +++++++++---------
 tests/ref/fate/ffprobe_csv                         | 60 +++++++++---------
 tests/ref/fate/ffprobe_default                     | 62 +++++++++----------
 tests/ref/fate/ffprobe_flat                        | 62 +++++++++----------
 tests/ref/fate/ffprobe_ini                         | 62 +++++++++----------
 tests/ref/fate/ffprobe_json                        | 62 +++++++++----------
 tests/ref/fate/ffprobe_xml                         | 60 +++++++++---------
 tests/ref/fate/ffprobe_xsd                         | 60 +++++++++---------
 tests/ref/fate/matroska-mastering-display-metadata |  4 +-
 12 files changed, 335 insertions(+), 301 deletions(-)

diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 62d9703b7a..8418573618 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -560,27 +560,22 @@ ffmpeg -i INPUT -metadata:s:a:0 language=eng OUTPUT
 @item -disposition[:stream_specifier] @var{value} (@emph{output,per-stream})
 Sets the disposition for a stream.
 
-This option overrides the disposition copied from the input stream. It is also
-possible to delete the disposition by setting it to 0.
-
-The following dispositions are recognized:
- at table @option
- at item default
- at item dub
- at item original
- at item comment
- at item lyrics
- at item karaoke
- at item forced
- at item hearing_impaired
- at item visual_impaired
- at item clean_effects
- at item attached_pic
- at item captions
- at item descriptions
- at item dependent
- at item metadata
- at end table
+By default, the disposition is copied from the input stream, unless the output
+stream this option applies to is fed by a complex filtergraph - in that case the
+disposition is unset by default.
+
+ at var{value} is a sequence of items separated by '+' or '-'. The first item may
+also be prefixed with '+' or '-', in which case this option modifies the default
+value. Otherwise (the first item is not prefixed) this options overrides the
+default value. A '+' prefix adds the given disposition, '-' removes it. It is
+also possible to clear the disposition by setting it to 0.
+
+If no @code{-disposition} options were specified for an output file, ffmpeg will
+automatically set the 'default' disposition on the first stream of each type,
+when there are multiple streams of this type in the output file and no stream of
+that type is already marked as default.
+
+The @code{-dispositions} option lists the known dispositions.
 
 For example, to make the second audio stream the default stream:
 @example
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 65d6a2668d..7b2dcee838 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3168,9 +3168,6 @@ static int init_output_stream_streamcopy(OutputStream *ost)
     if (ost->st->duration <= 0 && ist->st->duration > 0)
         ost->st->duration = av_rescale_q(ist->st->duration, ist->st->time_base, ost->st->time_base);
 
-    // copy disposition
-    ost->st->disposition = ist->st->disposition;
-
     if (ist->st->nb_side_data) {
         for (i = 0; i < ist->st->nb_side_data; i++) {
             const AVPacketSideData *sd_src = &ist->st->side_data[i];
@@ -3358,7 +3355,7 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame)
     AVCodecContext *enc_ctx = ost->enc_ctx;
     AVCodecContext *dec_ctx = NULL;
     AVFormatContext *oc = output_files[ost->file_index]->ctx;
-    int j, ret;
+    int ret;
 
     set_encoder_id(output_files[ost->file_index], ost);
 
@@ -3368,21 +3365,9 @@ static int init_output_stream_encode(OutputStream *ost, AVFrame *frame)
     av_dict_set(&ost->st->metadata, "rotate", NULL, 0);
 
     if (ist) {
-        ost->st->disposition          = ist->st->disposition;
-
         dec_ctx = ist->dec_ctx;
 
         enc_ctx->chroma_sample_location = dec_ctx->chroma_sample_location;
-    } else {
-        for (j = 0; j < oc->nb_streams; j++) {
-            AVStream *st = oc->streams[j];
-            if (st != ost->st && st->codecpar->codec_type == ost->st->codecpar->codec_type)
-                break;
-        }
-        if (j == oc->nb_streams)
-            if (ost->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO ||
-                ost->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
-                ost->st->disposition = AV_DISPOSITION_DEFAULT;
     }
 
     if (enc_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
@@ -3663,24 +3648,6 @@ static int init_output_stream(OutputStream *ost, AVFrame *frame,
             return ret;
     }
 
-    // parse user provided disposition, and update stream values
-    if (ost->disposition) {
-#if LIBAVFORMAT_VERSION_MAJOR >= 60
-        ret = av_opt_set(ost->st, "disposition", ost->disposition, 0);
-#else
-        {
-            const AVClass *class = av_stream_get_class();
-            const AVOption    *o = av_opt_find(&class, "disposition", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ);
-
-            av_assert0(o);
-            ret = av_opt_eval_flags(&class, o, ost->disposition, &ost->st->disposition);
-        }
-#endif
-
-        if (ret < 0)
-            return ret;
-    }
-
     /* initialize bitstream filters for the output stream
      * needs to be done here, because the codec id for streamcopy is not
      * known until now */
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index ab4c63a362..4685cf6435 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -2150,6 +2150,72 @@ static int copy_chapters(InputFile *ifile, OutputFile *ofile, int copy_metadata)
     return 0;
 }
 
+static int set_dispositions(OutputFile *of)
+{
+    int nb_streams[AVMEDIA_TYPE_NB]   = { 0 };
+    int have_default[AVMEDIA_TYPE_NB] = { 0 };
+    int have_manual = 0;
+
+    // first, copy the input dispositions
+    for (int i = 0; i< of->ctx->nb_streams; i++) {
+        OutputStream *ost = output_streams[of->ost_index + i];
+
+        nb_streams[ost->st->codecpar->codec_type]++;
+
+        have_manual |= !!ost->disposition;
+
+        if (ost->source_index >= 0) {
+            ost->st->disposition = input_streams[ost->source_index]->st->disposition;
+
+            if (ost->st->disposition & AV_DISPOSITION_DEFAULT)
+                have_default[ost->st->codecpar->codec_type] = 1;
+        }
+    }
+
+    if (have_manual) {
+        // process manually set dispositions - they override the above copy
+        for (int i = 0; i< of->ctx->nb_streams; i++) {
+            OutputStream *ost = output_streams[of->ost_index + i];
+            int ret;
+
+            if (!ost->disposition)
+                continue;
+
+#if LIBAVFORMAT_VERSION_MAJOR >= 60
+            ret = av_opt_set(ost->st, "disposition", ost->disposition, 0);
+#else
+            {
+                const AVClass *class = av_stream_get_class();
+                const AVOption    *o = av_opt_find(&class, "disposition", NULL, 0, AV_OPT_SEARCH_FAKE_OBJ);
+
+                av_assert0(o);
+                ret = av_opt_eval_flags(&class, o, ost->disposition, &ost->st->disposition);
+            }
+#endif
+
+            if (ret < 0)
+                return ret;
+        }
+    } else {
+        // For each media type with more than one stream, find a suitable stream to
+        // mark as default, unless one is already marked default.
+        // "Suitable" means the first of that type, skipping attached pictures.
+        for (int i = 0; i< of->ctx->nb_streams; i++) {
+            OutputStream *ost = output_streams[of->ost_index + i];
+            enum AVMediaType type = ost->st->codecpar->codec_type;
+
+            if (nb_streams[type] < 2 || have_default[type] ||
+                ost->st->disposition & AV_DISPOSITION_ATTACHED_PIC)
+                continue;
+
+            ost->st->disposition |= AV_DISPOSITION_DEFAULT;
+            have_default[type] = 1;
+        }
+    }
+
+    return 0;
+}
+
 static void init_output_filter(OutputFilter *ofilter, OptionsContext *o,
                                AVFormatContext *oc)
 {
@@ -2857,6 +2923,12 @@ loop_end:
         }
     }
 
+    err = set_dispositions(of);
+    if (err < 0) {
+        av_log(NULL, AV_LOG_FATAL, "Error setting output stream dispositions\n");
+        exit_program(1);
+    }
+
     return 0;
 }
 
diff --git a/tests/ref/fate/ffprobe_compact b/tests/ref/fate/ffprobe_compact
index 12565d2600..911777069a 100644
--- a/tests/ref/fate/ffprobe_compact
+++ b/tests/ref/fate/ffprobe_compact
@@ -1,32 +1,32 @@
-packet|codec_type=audio|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=1024|duration_time=0.023220|size=2048|pos=647|flags=K_
-frame|media_type=audio|stream_index=0|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=647|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
-packet|codec_type=video|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=230400|pos=2722|flags=K_
-frame|media_type=video|stream_index=1|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=2722|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
-packet|codec_type=video|stream_index=2|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=30000|pos=233143|flags=K_
-frame|media_type=video|stream_index=2|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=233143|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
-packet|codec_type=audio|stream_index=0|pts=1024|pts_time=0.023220|dts=1024|dts_time=0.023220|duration=1024|duration_time=0.023220|size=2048|pos=263148|flags=K_
-frame|media_type=audio|stream_index=0|key_frame=1|pts=1024|pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|best_effort_timestamp=1024|best_effort_timestamp_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263148|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
-packet|codec_type=video|stream_index=1|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=230400|pos=265226|flags=K_
-frame|media_type=video|stream_index=1|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=265226|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
-packet|codec_type=video|stream_index=2|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=30000|pos=495650|flags=K_
-frame|media_type=video|stream_index=2|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=495650|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
-packet|codec_type=audio|stream_index=0|pts=2048|pts_time=0.046440|dts=2048|dts_time=0.046440|duration=1024|duration_time=0.023220|size=2048|pos=525655|flags=K_
-frame|media_type=audio|stream_index=0|key_frame=1|pts=2048|pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|best_effort_timestamp=2048|best_effort_timestamp_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525655|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
-packet|codec_type=audio|stream_index=0|pts=3072|pts_time=0.069660|dts=3072|dts_time=0.069660|duration=1024|duration_time=0.023220|size=2048|pos=527726|flags=K_
-frame|media_type=audio|stream_index=0|key_frame=1|pts=3072|pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|best_effort_timestamp=3072|best_effort_timestamp_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527726|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
-packet|codec_type=video|stream_index=1|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=230400|pos=529804|flags=K_
-frame|media_type=video|stream_index=1|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=529804|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
-packet|codec_type=video|stream_index=2|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=30000|pos=760228|flags=K_
-frame|media_type=video|stream_index=2|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=760228|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
-packet|codec_type=audio|stream_index=0|pts=4096|pts_time=0.092880|dts=4096|dts_time=0.092880|duration=1024|duration_time=0.023220|size=2048|pos=790233|flags=K_
-frame|media_type=audio|stream_index=0|key_frame=1|pts=4096|pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|best_effort_timestamp=4096|best_effort_timestamp_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790233|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
-packet|codec_type=audio|stream_index=0|pts=5120|pts_time=0.116100|dts=5120|dts_time=0.116100|duration=393|duration_time=0.008912|size=786|pos=792304|flags=K_
-frame|media_type=audio|stream_index=0|key_frame=1|pts=5120|pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|best_effort_timestamp=5120|best_effort_timestamp_time=0.116100|pkt_duration=393|pkt_duration_time=0.008912|pkt_pos=792304|pkt_size=786|sample_fmt=s16|nb_samples=393|channels=1|channel_layout=unknown
-packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=230400|pos=793120|flags=K_
-frame|media_type=video|stream_index=1|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=793120|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
-packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=30000|pos=1023544|flags=K_
-frame|media_type=video|stream_index=2|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=1023544|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=audio|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=1024|duration_time=0.023220|size=2048|pos=669|flags=K_
+frame|media_type=audio|stream_index=0|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=669|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
+packet|codec_type=video|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=230400|pos=2744|flags=K_
+frame|media_type=video|stream_index=1|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=2744|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=video|stream_index=2|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=2048|duration_time=0.040000|size=30000|pos=233165|flags=K_
+frame|media_type=video|stream_index=2|key_frame=1|pts=0|pts_time=0.000000|pkt_dts=0|pkt_dts_time=0.000000|best_effort_timestamp=0|best_effort_timestamp_time=0.000000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=233165|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=audio|stream_index=0|pts=1024|pts_time=0.023220|dts=1024|dts_time=0.023220|duration=1024|duration_time=0.023220|size=2048|pos=263170|flags=K_
+frame|media_type=audio|stream_index=0|key_frame=1|pts=1024|pts_time=0.023220|pkt_dts=1024|pkt_dts_time=0.023220|best_effort_timestamp=1024|best_effort_timestamp_time=0.023220|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=263170|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
+packet|codec_type=video|stream_index=1|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=230400|pos=265248|flags=K_
+frame|media_type=video|stream_index=1|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=265248|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=video|stream_index=2|pts=2048|pts_time=0.040000|dts=2048|dts_time=0.040000|duration=2048|duration_time=0.040000|size=30000|pos=495672|flags=K_
+frame|media_type=video|stream_index=2|key_frame=1|pts=2048|pts_time=0.040000|pkt_dts=2048|pkt_dts_time=0.040000|best_effort_timestamp=2048|best_effort_timestamp_time=0.040000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=495672|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=audio|stream_index=0|pts=2048|pts_time=0.046440|dts=2048|dts_time=0.046440|duration=1024|duration_time=0.023220|size=2048|pos=525677|flags=K_
+frame|media_type=audio|stream_index=0|key_frame=1|pts=2048|pts_time=0.046440|pkt_dts=2048|pkt_dts_time=0.046440|best_effort_timestamp=2048|best_effort_timestamp_time=0.046440|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=525677|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
+packet|codec_type=audio|stream_index=0|pts=3072|pts_time=0.069660|dts=3072|dts_time=0.069660|duration=1024|duration_time=0.023220|size=2048|pos=527748|flags=K_
+frame|media_type=audio|stream_index=0|key_frame=1|pts=3072|pts_time=0.069660|pkt_dts=3072|pkt_dts_time=0.069660|best_effort_timestamp=3072|best_effort_timestamp_time=0.069660|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=527748|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
+packet|codec_type=video|stream_index=1|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=230400|pos=529826|flags=K_
+frame|media_type=video|stream_index=1|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=529826|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=video|stream_index=2|pts=4096|pts_time=0.080000|dts=4096|dts_time=0.080000|duration=2048|duration_time=0.040000|size=30000|pos=760250|flags=K_
+frame|media_type=video|stream_index=2|key_frame=1|pts=4096|pts_time=0.080000|pkt_dts=4096|pkt_dts_time=0.080000|best_effort_timestamp=4096|best_effort_timestamp_time=0.080000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=760250|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=audio|stream_index=0|pts=4096|pts_time=0.092880|dts=4096|dts_time=0.092880|duration=1024|duration_time=0.023220|size=2048|pos=790255|flags=K_
+frame|media_type=audio|stream_index=0|key_frame=1|pts=4096|pts_time=0.092880|pkt_dts=4096|pkt_dts_time=0.092880|best_effort_timestamp=4096|best_effort_timestamp_time=0.092880|pkt_duration=1024|pkt_duration_time=0.023220|pkt_pos=790255|pkt_size=2048|sample_fmt=s16|nb_samples=1024|channels=1|channel_layout=unknown
+packet|codec_type=audio|stream_index=0|pts=5120|pts_time=0.116100|dts=5120|dts_time=0.116100|duration=393|duration_time=0.008912|size=786|pos=792326|flags=K_
+frame|media_type=audio|stream_index=0|key_frame=1|pts=5120|pts_time=0.116100|pkt_dts=5120|pkt_dts_time=0.116100|best_effort_timestamp=5120|best_effort_timestamp_time=0.116100|pkt_duration=393|pkt_duration_time=0.008912|pkt_pos=792326|pkt_size=786|sample_fmt=s16|nb_samples=393|channels=1|channel_layout=unknown
+packet|codec_type=video|stream_index=1|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=230400|pos=793142|flags=K_
+frame|media_type=video|stream_index=1|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=793142|pkt_size=230400|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
+packet|codec_type=video|stream_index=2|pts=6144|pts_time=0.120000|dts=6144|dts_time=0.120000|duration=2048|duration_time=0.040000|size=30000|pos=1023566|flags=K_
+frame|media_type=video|stream_index=2|key_frame=1|pts=6144|pts_time=0.120000|pkt_dts=6144|pkt_dts_time=0.120000|best_effort_timestamp=6144|best_effort_timestamp_time=0.120000|pkt_duration=2048|pkt_duration_time=0.040000|pkt_pos=1023566|pkt_size=30000|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|color_range=unknown|color_space=unknown|color_primaries=unknown|color_transfer=unknown|chroma_location=unspecified
 stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_tag_string=PSD[16]|codec_tag=0x10445350|sample_fmt=s16|sample_rate=44100|channels=1|channel_layout=unknown|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=705600|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:E=mc²|tag:encoder=Lavc pcm_s16le
-stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptio
 ns=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt|tag:encoder=Lavc rawvideo
+stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|coded_width=320|coded_height=240|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=1|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptio
 ns=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:title=foobar|tag:duration_ts=field-and-tags-conflict-attempt|tag:encoder=Lavc rawvideo
 stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|coded_width=100|coded_height=100|closed_captions=0|film_grain=0|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/51200|start_pts=0|start_time=0.000000|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:captions=0|disposition:descriptio
 ns=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:encoder=Lavc rawvideo
-format|filename=tests/data/ffprobe-test.nut|nb_streams=3|nb_programs=0|format_name=nut|start_time=0.000000|duration=0.120000|size=1053624|bit_rate=70241600|probe_score=100|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': <tag value="x">|tag:comment2=I ♥ Üñîçød€
+format|filename=tests/data/ffprobe-test.nut|nb_streams=3|nb_programs=0|format_name=nut|start_time=0.000000|duration=0.120000|size=1053646|bit_rate=70243066|probe_score=100|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': <tag value="x">|tag:comment2=I ♥ Üñîçød€
diff --git a/tests/ref/fate/ffprobe_csv b/tests/ref/fate/ffprobe_csv
index 0bbc15e4d5..fd6bb242c9 100644
--- a/tests/ref/fate/ffprobe_csv
+++ b/tests/ref/fate/ffprobe_csv
@@ -1,32 +1,32 @@
-packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,2048,647,K_
-frame,audio,0,1,0,0.000000,0,0.000000,0,0.000000,1024,0.023220,647,2048,s16,1024,1,unknown
-packet,video,1,0,0.000000,0,0.000000,2048,0.040000,230400,2722,K_
-frame,video,1,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,2722,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
-packet,video,2,0,0.000000,0,0.000000,2048,0.040000,30000,233143,K_
-frame,video,2,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,233143,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
-packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,2048,263148,K_
-frame,audio,0,1,1024,0.023220,1024,0.023220,1024,0.023220,1024,0.023220,263148,2048,s16,1024,1,unknown
-packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,230400,265226,K_
-frame,video,1,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,265226,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
-packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,30000,495650,K_
-frame,video,2,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,495650,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
-packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,2048,525655,K_
-frame,audio,0,1,2048,0.046440,2048,0.046440,2048,0.046440,1024,0.023220,525655,2048,s16,1024,1,unknown
-packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,2048,527726,K_
-frame,audio,0,1,3072,0.069660,3072,0.069660,3072,0.069660,1024,0.023220,527726,2048,s16,1024,1,unknown
-packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,230400,529804,K_
-frame,video,1,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,529804,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
-packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,30000,760228,K_
-frame,video,2,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,760228,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
-packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,2048,790233,K_
-frame,audio,0,1,4096,0.092880,4096,0.092880,4096,0.092880,1024,0.023220,790233,2048,s16,1024,1,unknown
-packet,audio,0,5120,0.116100,5120,0.116100,393,0.008912,786,792304,K_
-frame,audio,0,1,5120,0.116100,5120,0.116100,5120,0.116100,393,0.008912,792304,786,s16,393,1,unknown
-packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,230400,793120,K_
-frame,video,1,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,793120,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
-packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,30000,1023544,K_
-frame,video,2,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,1023544,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,audio,0,0,0.000000,0,0.000000,1024,0.023220,2048,669,K_
+frame,audio,0,1,0,0.000000,0,0.000000,0,0.000000,1024,0.023220,669,2048,s16,1024,1,unknown
+packet,video,1,0,0.000000,0,0.000000,2048,0.040000,230400,2744,K_
+frame,video,1,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,2744,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,video,2,0,0.000000,0,0.000000,2048,0.040000,30000,233165,K_
+frame,video,2,1,0,0.000000,0,0.000000,0,0.000000,2048,0.040000,233165,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,audio,0,1024,0.023220,1024,0.023220,1024,0.023220,2048,263170,K_
+frame,audio,0,1,1024,0.023220,1024,0.023220,1024,0.023220,1024,0.023220,263170,2048,s16,1024,1,unknown
+packet,video,1,2048,0.040000,2048,0.040000,2048,0.040000,230400,265248,K_
+frame,video,1,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,265248,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,video,2,2048,0.040000,2048,0.040000,2048,0.040000,30000,495672,K_
+frame,video,2,1,2048,0.040000,2048,0.040000,2048,0.040000,2048,0.040000,495672,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,audio,0,2048,0.046440,2048,0.046440,1024,0.023220,2048,525677,K_
+frame,audio,0,1,2048,0.046440,2048,0.046440,2048,0.046440,1024,0.023220,525677,2048,s16,1024,1,unknown
+packet,audio,0,3072,0.069660,3072,0.069660,1024,0.023220,2048,527748,K_
+frame,audio,0,1,3072,0.069660,3072,0.069660,3072,0.069660,1024,0.023220,527748,2048,s16,1024,1,unknown
+packet,video,1,4096,0.080000,4096,0.080000,2048,0.040000,230400,529826,K_
+frame,video,1,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,529826,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,video,2,4096,0.080000,4096,0.080000,2048,0.040000,30000,760250,K_
+frame,video,2,1,4096,0.080000,4096,0.080000,4096,0.080000,2048,0.040000,760250,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,audio,0,4096,0.092880,4096,0.092880,1024,0.023220,2048,790255,K_
+frame,audio,0,1,4096,0.092880,4096,0.092880,4096,0.092880,1024,0.023220,790255,2048,s16,1024,1,unknown
+packet,audio,0,5120,0.116100,5120,0.116100,393,0.008912,786,792326,K_
+frame,audio,0,1,5120,0.116100,5120,0.116100,5120,0.116100,393,0.008912,792326,786,s16,393,1,unknown
+packet,video,1,6144,0.120000,6144,0.120000,2048,0.040000,230400,793142,K_
+frame,video,1,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,793142,230400,320,240,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
+packet,video,2,6144,0.120000,6144,0.120000,2048,0.040000,30000,1023566,K_
+frame,video,2,1,6144,0.120000,6144,0.120000,6144,0.120000,2048,0.040000,1023566,30000,100,100,rgb24,1:1,I,0,0,0,0,0,unknown,unknown,unknown,unknown,unspecified
 stream,0,pcm_s16le,unknown,audio,PSD[16],0x10445350,s16,44100,1,unknown,16,N/A,0/0,0/0,1/44100,0,0.000000,N/A,N/A,705600,N/A,N/A,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,mc²,Lavc pcm_s16le
-stream,1,rawvideo,unknown,video,RGB[24],0x18424752,320,240,320,240,0,0,0,1:1,4:3,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt,Lavc rawvideo
+stream,1,rawvideo,unknown,video,RGB[24],0x18424752,320,240,320,240,0,0,0,1:1,4:3,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,foobar,field-and-tags-conflict-attempt,Lavc rawvideo
 stream,2,rawvideo,unknown,video,RGB[24],0x18424752,100,100,100,100,0,0,0,1:1,1:1,rgb24,-99,unknown,unknown,unknown,unknown,unspecified,unknown,1,N/A,25/1,25/1,1/51200,0,0.000000,N/A,N/A,N/A,N/A,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Lavc rawvideo
-format,tests/data/ffprobe-test.nut,3,0,nut,0.000000,0.120000,1053624,70241600,100,ffprobe test file,"'A comment with CSV, XML & JSON special chars': <tag value=""x"">",I ♥ Üñîçød€
+format,tests/data/ffprobe-test.nut,3,0,nut,0.000000,0.120000,1053646,70243066,100,ffprobe test file,"'A comment with CSV, XML & JSON special chars': <tag value=""x"">",I ♥ Üñîçød€
diff --git a/tests/ref/fate/ffprobe_default b/tests/ref/fate/ffprobe_default
index 54e992c406..d3d90fa5d6 100644
--- a/tests/ref/fate/ffprobe_default
+++ b/tests/ref/fate/ffprobe_default
@@ -8,7 +8,7 @@ dts_time=0.000000
 duration=1024
 duration_time=0.023220
 size=2048
-pos=647
+pos=669
 flags=K_
 [/PACKET]
 [FRAME]
@@ -23,7 +23,7 @@ best_effort_timestamp=0
 best_effort_timestamp_time=0.000000
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=647
+pkt_pos=669
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -40,7 +40,7 @@ dts_time=0.000000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=2722
+pos=2744
 flags=K_
 [/PACKET]
 [FRAME]
@@ -55,7 +55,7 @@ best_effort_timestamp=0
 best_effort_timestamp_time=0.000000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=2722
+pkt_pos=2744
 pkt_size=230400
 width=320
 height=240
@@ -83,7 +83,7 @@ dts_time=0.000000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=233143
+pos=233165
 flags=K_
 [/PACKET]
 [FRAME]
@@ -98,7 +98,7 @@ best_effort_timestamp=0
 best_effort_timestamp_time=0.000000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=233143
+pkt_pos=233165
 pkt_size=30000
 width=100
 height=100
@@ -126,7 +126,7 @@ dts_time=0.023220
 duration=1024
 duration_time=0.023220
 size=2048
-pos=263148
+pos=263170
 flags=K_
 [/PACKET]
 [FRAME]
@@ -141,7 +141,7 @@ best_effort_timestamp=1024
 best_effort_timestamp_time=0.023220
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=263148
+pkt_pos=263170
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -158,7 +158,7 @@ dts_time=0.040000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=265226
+pos=265248
 flags=K_
 [/PACKET]
 [FRAME]
@@ -173,7 +173,7 @@ best_effort_timestamp=2048
 best_effort_timestamp_time=0.040000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=265226
+pkt_pos=265248
 pkt_size=230400
 width=320
 height=240
@@ -201,7 +201,7 @@ dts_time=0.040000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=495650
+pos=495672
 flags=K_
 [/PACKET]
 [FRAME]
@@ -216,7 +216,7 @@ best_effort_timestamp=2048
 best_effort_timestamp_time=0.040000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=495650
+pkt_pos=495672
 pkt_size=30000
 width=100
 height=100
@@ -244,7 +244,7 @@ dts_time=0.046440
 duration=1024
 duration_time=0.023220
 size=2048
-pos=525655
+pos=525677
 flags=K_
 [/PACKET]
 [FRAME]
@@ -259,7 +259,7 @@ best_effort_timestamp=2048
 best_effort_timestamp_time=0.046440
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=525655
+pkt_pos=525677
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -276,7 +276,7 @@ dts_time=0.069660
 duration=1024
 duration_time=0.023220
 size=2048
-pos=527726
+pos=527748
 flags=K_
 [/PACKET]
 [FRAME]
@@ -291,7 +291,7 @@ best_effort_timestamp=3072
 best_effort_timestamp_time=0.069660
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=527726
+pkt_pos=527748
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -308,7 +308,7 @@ dts_time=0.080000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=529804
+pos=529826
 flags=K_
 [/PACKET]
 [FRAME]
@@ -323,7 +323,7 @@ best_effort_timestamp=4096
 best_effort_timestamp_time=0.080000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=529804
+pkt_pos=529826
 pkt_size=230400
 width=320
 height=240
@@ -351,7 +351,7 @@ dts_time=0.080000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=760228
+pos=760250
 flags=K_
 [/PACKET]
 [FRAME]
@@ -366,7 +366,7 @@ best_effort_timestamp=4096
 best_effort_timestamp_time=0.080000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=760228
+pkt_pos=760250
 pkt_size=30000
 width=100
 height=100
@@ -394,7 +394,7 @@ dts_time=0.092880
 duration=1024
 duration_time=0.023220
 size=2048
-pos=790233
+pos=790255
 flags=K_
 [/PACKET]
 [FRAME]
@@ -409,7 +409,7 @@ best_effort_timestamp=4096
 best_effort_timestamp_time=0.092880
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=790233
+pkt_pos=790255
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -426,7 +426,7 @@ dts_time=0.116100
 duration=393
 duration_time=0.008912
 size=786
-pos=792304
+pos=792326
 flags=K_
 [/PACKET]
 [FRAME]
@@ -441,7 +441,7 @@ best_effort_timestamp=5120
 best_effort_timestamp_time=0.116100
 pkt_duration=393
 pkt_duration_time=0.008912
-pkt_pos=792304
+pkt_pos=792326
 pkt_size=786
 sample_fmt=s16
 nb_samples=393
@@ -458,7 +458,7 @@ dts_time=0.120000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=793120
+pos=793142
 flags=K_
 [/PACKET]
 [FRAME]
@@ -473,7 +473,7 @@ best_effort_timestamp=6144
 best_effort_timestamp_time=0.120000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=793120
+pkt_pos=793142
 pkt_size=230400
 width=320
 height=240
@@ -501,7 +501,7 @@ dts_time=0.120000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=1023544
+pos=1023566
 flags=K_
 [/PACKET]
 [FRAME]
@@ -516,7 +516,7 @@ best_effort_timestamp=6144
 best_effort_timestamp_time=0.120000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=1023544
+pkt_pos=1023566
 pkt_size=30000
 width=100
 height=100
@@ -619,7 +619,7 @@ bits_per_raw_sample=N/A
 nb_frames=N/A
 nb_read_frames=4
 nb_read_packets=4
-DISPOSITION:default=0
+DISPOSITION:default=1
 DISPOSITION:dub=0
 DISPOSITION:original=0
 DISPOSITION:comment=0
@@ -705,8 +705,8 @@ nb_programs=0
 format_name=nut
 start_time=0.000000
 duration=0.120000
-size=1053624
-bit_rate=70241600
+size=1053646
+bit_rate=70243066
 probe_score=100
 TAG:title=ffprobe test file
 TAG:comment='A comment with CSV, XML & JSON special chars': <tag value="x">
diff --git a/tests/ref/fate/ffprobe_flat b/tests/ref/fate/ffprobe_flat
index 4b0b4b3881..e77dec6b84 100644
--- a/tests/ref/fate/ffprobe_flat
+++ b/tests/ref/fate/ffprobe_flat
@@ -7,7 +7,7 @@ packets_and_frames.packet.0.dts_time="0.000000"
 packets_and_frames.packet.0.duration=1024
 packets_and_frames.packet.0.duration_time="0.023220"
 packets_and_frames.packet.0.size="2048"
-packets_and_frames.packet.0.pos="647"
+packets_and_frames.packet.0.pos="669"
 packets_and_frames.packet.0.flags="K_"
 packets_and_frames.frame.0.media_type="audio"
 packets_and_frames.frame.0.stream_index=0
@@ -20,7 +20,7 @@ packets_and_frames.frame.0.best_effort_timestamp=0
 packets_and_frames.frame.0.best_effort_timestamp_time="0.000000"
 packets_and_frames.frame.0.pkt_duration=1024
 packets_and_frames.frame.0.pkt_duration_time="0.023220"
-packets_and_frames.frame.0.pkt_pos="647"
+packets_and_frames.frame.0.pkt_pos="669"
 packets_and_frames.frame.0.pkt_size="2048"
 packets_and_frames.frame.0.sample_fmt="s16"
 packets_and_frames.frame.0.nb_samples=1024
@@ -35,7 +35,7 @@ packets_and_frames.packet.1.dts_time="0.000000"
 packets_and_frames.packet.1.duration=2048
 packets_and_frames.packet.1.duration_time="0.040000"
 packets_and_frames.packet.1.size="230400"
-packets_and_frames.packet.1.pos="2722"
+packets_and_frames.packet.1.pos="2744"
 packets_and_frames.packet.1.flags="K_"
 packets_and_frames.frame.1.media_type="video"
 packets_and_frames.frame.1.stream_index=1
@@ -48,7 +48,7 @@ packets_and_frames.frame.1.best_effort_timestamp=0
 packets_and_frames.frame.1.best_effort_timestamp_time="0.000000"
 packets_and_frames.frame.1.pkt_duration=2048
 packets_and_frames.frame.1.pkt_duration_time="0.040000"
-packets_and_frames.frame.1.pkt_pos="2722"
+packets_and_frames.frame.1.pkt_pos="2744"
 packets_and_frames.frame.1.pkt_size="230400"
 packets_and_frames.frame.1.width=320
 packets_and_frames.frame.1.height=240
@@ -74,7 +74,7 @@ packets_and_frames.packet.2.dts_time="0.000000"
 packets_and_frames.packet.2.duration=2048
 packets_and_frames.packet.2.duration_time="0.040000"
 packets_and_frames.packet.2.size="30000"
-packets_and_frames.packet.2.pos="233143"
+packets_and_frames.packet.2.pos="233165"
 packets_and_frames.packet.2.flags="K_"
 packets_and_frames.frame.2.media_type="video"
 packets_and_frames.frame.2.stream_index=2
@@ -87,7 +87,7 @@ packets_and_frames.frame.2.best_effort_timestamp=0
 packets_and_frames.frame.2.best_effort_timestamp_time="0.000000"
 packets_and_frames.frame.2.pkt_duration=2048
 packets_and_frames.frame.2.pkt_duration_time="0.040000"
-packets_and_frames.frame.2.pkt_pos="233143"
+packets_and_frames.frame.2.pkt_pos="233165"
 packets_and_frames.frame.2.pkt_size="30000"
 packets_and_frames.frame.2.width=100
 packets_and_frames.frame.2.height=100
@@ -113,7 +113,7 @@ packets_and_frames.packet.3.dts_time="0.023220"
 packets_and_frames.packet.3.duration=1024
 packets_and_frames.packet.3.duration_time="0.023220"
 packets_and_frames.packet.3.size="2048"
-packets_and_frames.packet.3.pos="263148"
+packets_and_frames.packet.3.pos="263170"
 packets_and_frames.packet.3.flags="K_"
 packets_and_frames.frame.3.media_type="audio"
 packets_and_frames.frame.3.stream_index=0
@@ -126,7 +126,7 @@ packets_and_frames.frame.3.best_effort_timestamp=1024
 packets_and_frames.frame.3.best_effort_timestamp_time="0.023220"
 packets_and_frames.frame.3.pkt_duration=1024
 packets_and_frames.frame.3.pkt_duration_time="0.023220"
-packets_and_frames.frame.3.pkt_pos="263148"
+packets_and_frames.frame.3.pkt_pos="263170"
 packets_and_frames.frame.3.pkt_size="2048"
 packets_and_frames.frame.3.sample_fmt="s16"
 packets_and_frames.frame.3.nb_samples=1024
@@ -141,7 +141,7 @@ packets_and_frames.packet.4.dts_time="0.040000"
 packets_and_frames.packet.4.duration=2048
 packets_and_frames.packet.4.duration_time="0.040000"
 packets_and_frames.packet.4.size="230400"
-packets_and_frames.packet.4.pos="265226"
+packets_and_frames.packet.4.pos="265248"
 packets_and_frames.packet.4.flags="K_"
 packets_and_frames.frame.4.media_type="video"
 packets_and_frames.frame.4.stream_index=1
@@ -154,7 +154,7 @@ packets_and_frames.frame.4.best_effort_timestamp=2048
 packets_and_frames.frame.4.best_effort_timestamp_time="0.040000"
 packets_and_frames.frame.4.pkt_duration=2048
 packets_and_frames.frame.4.pkt_duration_time="0.040000"
-packets_and_frames.frame.4.pkt_pos="265226"
+packets_and_frames.frame.4.pkt_pos="265248"
 packets_and_frames.frame.4.pkt_size="230400"
 packets_and_frames.frame.4.width=320
 packets_and_frames.frame.4.height=240
@@ -180,7 +180,7 @@ packets_and_frames.packet.5.dts_time="0.040000"
 packets_and_frames.packet.5.duration=2048
 packets_and_frames.packet.5.duration_time="0.040000"
 packets_and_frames.packet.5.size="30000"
-packets_and_frames.packet.5.pos="495650"
+packets_and_frames.packet.5.pos="495672"
 packets_and_frames.packet.5.flags="K_"
 packets_and_frames.frame.5.media_type="video"
 packets_and_frames.frame.5.stream_index=2
@@ -193,7 +193,7 @@ packets_and_frames.frame.5.best_effort_timestamp=2048
 packets_and_frames.frame.5.best_effort_timestamp_time="0.040000"
 packets_and_frames.frame.5.pkt_duration=2048
 packets_and_frames.frame.5.pkt_duration_time="0.040000"
-packets_and_frames.frame.5.pkt_pos="495650"
+packets_and_frames.frame.5.pkt_pos="495672"
 packets_and_frames.frame.5.pkt_size="30000"
 packets_and_frames.frame.5.width=100
 packets_and_frames.frame.5.height=100
@@ -219,7 +219,7 @@ packets_and_frames.packet.6.dts_time="0.046440"
 packets_and_frames.packet.6.duration=1024
 packets_and_frames.packet.6.duration_time="0.023220"
 packets_and_frames.packet.6.size="2048"
-packets_and_frames.packet.6.pos="525655"
+packets_and_frames.packet.6.pos="525677"
 packets_and_frames.packet.6.flags="K_"
 packets_and_frames.frame.6.media_type="audio"
 packets_and_frames.frame.6.stream_index=0
@@ -232,7 +232,7 @@ packets_and_frames.frame.6.best_effort_timestamp=2048
 packets_and_frames.frame.6.best_effort_timestamp_time="0.046440"
 packets_and_frames.frame.6.pkt_duration=1024
 packets_and_frames.frame.6.pkt_duration_time="0.023220"
-packets_and_frames.frame.6.pkt_pos="525655"
+packets_and_frames.frame.6.pkt_pos="525677"
 packets_and_frames.frame.6.pkt_size="2048"
 packets_and_frames.frame.6.sample_fmt="s16"
 packets_and_frames.frame.6.nb_samples=1024
@@ -247,7 +247,7 @@ packets_and_frames.packet.7.dts_time="0.069660"
 packets_and_frames.packet.7.duration=1024
 packets_and_frames.packet.7.duration_time="0.023220"
 packets_and_frames.packet.7.size="2048"
-packets_and_frames.packet.7.pos="527726"
+packets_and_frames.packet.7.pos="527748"
 packets_and_frames.packet.7.flags="K_"
 packets_and_frames.frame.7.media_type="audio"
 packets_and_frames.frame.7.stream_index=0
@@ -260,7 +260,7 @@ packets_and_frames.frame.7.best_effort_timestamp=3072
 packets_and_frames.frame.7.best_effort_timestamp_time="0.069660"
 packets_and_frames.frame.7.pkt_duration=1024
 packets_and_frames.frame.7.pkt_duration_time="0.023220"
-packets_and_frames.frame.7.pkt_pos="527726"
+packets_and_frames.frame.7.pkt_pos="527748"
 packets_and_frames.frame.7.pkt_size="2048"
 packets_and_frames.frame.7.sample_fmt="s16"
 packets_and_frames.frame.7.nb_samples=1024
@@ -275,7 +275,7 @@ packets_and_frames.packet.8.dts_time="0.080000"
 packets_and_frames.packet.8.duration=2048
 packets_and_frames.packet.8.duration_time="0.040000"
 packets_and_frames.packet.8.size="230400"
-packets_and_frames.packet.8.pos="529804"
+packets_and_frames.packet.8.pos="529826"
 packets_and_frames.packet.8.flags="K_"
 packets_and_frames.frame.8.media_type="video"
 packets_and_frames.frame.8.stream_index=1
@@ -288,7 +288,7 @@ packets_and_frames.frame.8.best_effort_timestamp=4096
 packets_and_frames.frame.8.best_effort_timestamp_time="0.080000"
 packets_and_frames.frame.8.pkt_duration=2048
 packets_and_frames.frame.8.pkt_duration_time="0.040000"
-packets_and_frames.frame.8.pkt_pos="529804"
+packets_and_frames.frame.8.pkt_pos="529826"
 packets_and_frames.frame.8.pkt_size="230400"
 packets_and_frames.frame.8.width=320
 packets_and_frames.frame.8.height=240
@@ -314,7 +314,7 @@ packets_and_frames.packet.9.dts_time="0.080000"
 packets_and_frames.packet.9.duration=2048
 packets_and_frames.packet.9.duration_time="0.040000"
 packets_and_frames.packet.9.size="30000"
-packets_and_frames.packet.9.pos="760228"
+packets_and_frames.packet.9.pos="760250"
 packets_and_frames.packet.9.flags="K_"
 packets_and_frames.frame.9.media_type="video"
 packets_and_frames.frame.9.stream_index=2
@@ -327,7 +327,7 @@ packets_and_frames.frame.9.best_effort_timestamp=4096
 packets_and_frames.frame.9.best_effort_timestamp_time="0.080000"
 packets_and_frames.frame.9.pkt_duration=2048
 packets_and_frames.frame.9.pkt_duration_time="0.040000"
-packets_and_frames.frame.9.pkt_pos="760228"
+packets_and_frames.frame.9.pkt_pos="760250"
 packets_and_frames.frame.9.pkt_size="30000"
 packets_and_frames.frame.9.width=100
 packets_and_frames.frame.9.height=100
@@ -353,7 +353,7 @@ packets_and_frames.packet.10.dts_time="0.092880"
 packets_and_frames.packet.10.duration=1024
 packets_and_frames.packet.10.duration_time="0.023220"
 packets_and_frames.packet.10.size="2048"
-packets_and_frames.packet.10.pos="790233"
+packets_and_frames.packet.10.pos="790255"
 packets_and_frames.packet.10.flags="K_"
 packets_and_frames.frame.10.media_type="audio"
 packets_and_frames.frame.10.stream_index=0
@@ -366,7 +366,7 @@ packets_and_frames.frame.10.best_effort_timestamp=4096
 packets_and_frames.frame.10.best_effort_timestamp_time="0.092880"
 packets_and_frames.frame.10.pkt_duration=1024
 packets_and_frames.frame.10.pkt_duration_time="0.023220"
-packets_and_frames.frame.10.pkt_pos="790233"
+packets_and_frames.frame.10.pkt_pos="790255"
 packets_and_frames.frame.10.pkt_size="2048"
 packets_and_frames.frame.10.sample_fmt="s16"
 packets_and_frames.frame.10.nb_samples=1024
@@ -381,7 +381,7 @@ packets_and_frames.packet.11.dts_time="0.116100"
 packets_and_frames.packet.11.duration=393
 packets_and_frames.packet.11.duration_time="0.008912"
 packets_and_frames.packet.11.size="786"
-packets_and_frames.packet.11.pos="792304"
+packets_and_frames.packet.11.pos="792326"
 packets_and_frames.packet.11.flags="K_"
 packets_and_frames.frame.11.media_type="audio"
 packets_and_frames.frame.11.stream_index=0
@@ -394,7 +394,7 @@ packets_and_frames.frame.11.best_effort_timestamp=5120
 packets_and_frames.frame.11.best_effort_timestamp_time="0.116100"
 packets_and_frames.frame.11.pkt_duration=393
 packets_and_frames.frame.11.pkt_duration_time="0.008912"
-packets_and_frames.frame.11.pkt_pos="792304"
+packets_and_frames.frame.11.pkt_pos="792326"
 packets_and_frames.frame.11.pkt_size="786"
 packets_and_frames.frame.11.sample_fmt="s16"
 packets_and_frames.frame.11.nb_samples=393
@@ -409,7 +409,7 @@ packets_and_frames.packet.12.dts_time="0.120000"
 packets_and_frames.packet.12.duration=2048
 packets_and_frames.packet.12.duration_time="0.040000"
 packets_and_frames.packet.12.size="230400"
-packets_and_frames.packet.12.pos="793120"
+packets_and_frames.packet.12.pos="793142"
 packets_and_frames.packet.12.flags="K_"
 packets_and_frames.frame.12.media_type="video"
 packets_and_frames.frame.12.stream_index=1
@@ -422,7 +422,7 @@ packets_and_frames.frame.12.best_effort_timestamp=6144
 packets_and_frames.frame.12.best_effort_timestamp_time="0.120000"
 packets_and_frames.frame.12.pkt_duration=2048
 packets_and_frames.frame.12.pkt_duration_time="0.040000"
-packets_and_frames.frame.12.pkt_pos="793120"
+packets_and_frames.frame.12.pkt_pos="793142"
 packets_and_frames.frame.12.pkt_size="230400"
 packets_and_frames.frame.12.width=320
 packets_and_frames.frame.12.height=240
@@ -448,7 +448,7 @@ packets_and_frames.packet.13.dts_time="0.120000"
 packets_and_frames.packet.13.duration=2048
 packets_and_frames.packet.13.duration_time="0.040000"
 packets_and_frames.packet.13.size="30000"
-packets_and_frames.packet.13.pos="1023544"
+packets_and_frames.packet.13.pos="1023566"
 packets_and_frames.packet.13.flags="K_"
 packets_and_frames.frame.13.media_type="video"
 packets_and_frames.frame.13.stream_index=2
@@ -461,7 +461,7 @@ packets_and_frames.frame.13.best_effort_timestamp=6144
 packets_and_frames.frame.13.best_effort_timestamp_time="0.120000"
 packets_and_frames.frame.13.pkt_duration=2048
 packets_and_frames.frame.13.pkt_duration_time="0.040000"
-packets_and_frames.frame.13.pkt_pos="1023544"
+packets_and_frames.frame.13.pkt_pos="1023566"
 packets_and_frames.frame.13.pkt_size="30000"
 packets_and_frames.frame.13.width=100
 packets_and_frames.frame.13.height=100
@@ -560,7 +560,7 @@ streams.stream.1.bits_per_raw_sample="N/A"
 streams.stream.1.nb_frames="N/A"
 streams.stream.1.nb_read_frames="4"
 streams.stream.1.nb_read_packets="4"
-streams.stream.1.disposition.default=0
+streams.stream.1.disposition.default=1
 streams.stream.1.disposition.dub=0
 streams.stream.1.disposition.original=0
 streams.stream.1.disposition.comment=0
@@ -642,8 +642,8 @@ format.nb_programs=0
 format.format_name="nut"
 format.start_time="0.000000"
 format.duration="0.120000"
-format.size="1053624"
-format.bit_rate="70241600"
+format.size="1053646"
+format.bit_rate="70243066"
 format.probe_score=100
 format.tags.title="ffprobe test file"
 format.tags.comment="'A comment with CSV, XML & JSON special chars': <tag value=\"x\">"
diff --git a/tests/ref/fate/ffprobe_ini b/tests/ref/fate/ffprobe_ini
index f64c4e891d..cff7d96003 100644
--- a/tests/ref/fate/ffprobe_ini
+++ b/tests/ref/fate/ffprobe_ini
@@ -10,7 +10,7 @@ dts_time=0.000000
 duration=1024
 duration_time=0.023220
 size=2048
-pos=647
+pos=669
 flags=K_
 
 [packets_and_frames.frame.0]
@@ -25,7 +25,7 @@ best_effort_timestamp=0
 best_effort_timestamp_time=0.000000
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=647
+pkt_pos=669
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -42,7 +42,7 @@ dts_time=0.000000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=2722
+pos=2744
 flags=K_
 
 [packets_and_frames.frame.1]
@@ -57,7 +57,7 @@ best_effort_timestamp=0
 best_effort_timestamp_time=0.000000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=2722
+pkt_pos=2744
 pkt_size=230400
 width=320
 height=240
@@ -85,7 +85,7 @@ dts_time=0.000000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=233143
+pos=233165
 flags=K_
 
 [packets_and_frames.frame.2]
@@ -100,7 +100,7 @@ best_effort_timestamp=0
 best_effort_timestamp_time=0.000000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=233143
+pkt_pos=233165
 pkt_size=30000
 width=100
 height=100
@@ -128,7 +128,7 @@ dts_time=0.023220
 duration=1024
 duration_time=0.023220
 size=2048
-pos=263148
+pos=263170
 flags=K_
 
 [packets_and_frames.frame.3]
@@ -143,7 +143,7 @@ best_effort_timestamp=1024
 best_effort_timestamp_time=0.023220
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=263148
+pkt_pos=263170
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -160,7 +160,7 @@ dts_time=0.040000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=265226
+pos=265248
 flags=K_
 
 [packets_and_frames.frame.4]
@@ -175,7 +175,7 @@ best_effort_timestamp=2048
 best_effort_timestamp_time=0.040000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=265226
+pkt_pos=265248
 pkt_size=230400
 width=320
 height=240
@@ -203,7 +203,7 @@ dts_time=0.040000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=495650
+pos=495672
 flags=K_
 
 [packets_and_frames.frame.5]
@@ -218,7 +218,7 @@ best_effort_timestamp=2048
 best_effort_timestamp_time=0.040000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=495650
+pkt_pos=495672
 pkt_size=30000
 width=100
 height=100
@@ -246,7 +246,7 @@ dts_time=0.046440
 duration=1024
 duration_time=0.023220
 size=2048
-pos=525655
+pos=525677
 flags=K_
 
 [packets_and_frames.frame.6]
@@ -261,7 +261,7 @@ best_effort_timestamp=2048
 best_effort_timestamp_time=0.046440
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=525655
+pkt_pos=525677
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -278,7 +278,7 @@ dts_time=0.069660
 duration=1024
 duration_time=0.023220
 size=2048
-pos=527726
+pos=527748
 flags=K_
 
 [packets_and_frames.frame.7]
@@ -293,7 +293,7 @@ best_effort_timestamp=3072
 best_effort_timestamp_time=0.069660
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=527726
+pkt_pos=527748
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -310,7 +310,7 @@ dts_time=0.080000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=529804
+pos=529826
 flags=K_
 
 [packets_and_frames.frame.8]
@@ -325,7 +325,7 @@ best_effort_timestamp=4096
 best_effort_timestamp_time=0.080000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=529804
+pkt_pos=529826
 pkt_size=230400
 width=320
 height=240
@@ -353,7 +353,7 @@ dts_time=0.080000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=760228
+pos=760250
 flags=K_
 
 [packets_and_frames.frame.9]
@@ -368,7 +368,7 @@ best_effort_timestamp=4096
 best_effort_timestamp_time=0.080000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=760228
+pkt_pos=760250
 pkt_size=30000
 width=100
 height=100
@@ -396,7 +396,7 @@ dts_time=0.092880
 duration=1024
 duration_time=0.023220
 size=2048
-pos=790233
+pos=790255
 flags=K_
 
 [packets_and_frames.frame.10]
@@ -411,7 +411,7 @@ best_effort_timestamp=4096
 best_effort_timestamp_time=0.092880
 pkt_duration=1024
 pkt_duration_time=0.023220
-pkt_pos=790233
+pkt_pos=790255
 pkt_size=2048
 sample_fmt=s16
 nb_samples=1024
@@ -428,7 +428,7 @@ dts_time=0.116100
 duration=393
 duration_time=0.008912
 size=786
-pos=792304
+pos=792326
 flags=K_
 
 [packets_and_frames.frame.11]
@@ -443,7 +443,7 @@ best_effort_timestamp=5120
 best_effort_timestamp_time=0.116100
 pkt_duration=393
 pkt_duration_time=0.008912
-pkt_pos=792304
+pkt_pos=792326
 pkt_size=786
 sample_fmt=s16
 nb_samples=393
@@ -460,7 +460,7 @@ dts_time=0.120000
 duration=2048
 duration_time=0.040000
 size=230400
-pos=793120
+pos=793142
 flags=K_
 
 [packets_and_frames.frame.12]
@@ -475,7 +475,7 @@ best_effort_timestamp=6144
 best_effort_timestamp_time=0.120000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=793120
+pkt_pos=793142
 pkt_size=230400
 width=320
 height=240
@@ -503,7 +503,7 @@ dts_time=0.120000
 duration=2048
 duration_time=0.040000
 size=30000
-pos=1023544
+pos=1023566
 flags=K_
 
 [packets_and_frames.frame.13]
@@ -518,7 +518,7 @@ best_effort_timestamp=6144
 best_effort_timestamp_time=0.120000
 pkt_duration=2048
 pkt_duration_time=0.040000
-pkt_pos=1023544
+pkt_pos=1023566
 pkt_size=30000
 width=100
 height=100
@@ -627,7 +627,7 @@ nb_read_frames=4
 nb_read_packets=4
 
 [streams.stream.1.disposition]
-default=0
+default=1
 dub=0
 original=0
 comment=0
@@ -719,8 +719,8 @@ nb_programs=0
 format_name=nut
 start_time=0.000000
 duration=0.120000
-size=1053624
-bit_rate=70241600
+size=1053646
+bit_rate=70243066
 probe_score=100
 
 [format.tags]
diff --git a/tests/ref/fate/ffprobe_json b/tests/ref/fate/ffprobe_json
index a94776030b..9816700b53 100644
--- a/tests/ref/fate/ffprobe_json
+++ b/tests/ref/fate/ffprobe_json
@@ -11,7 +11,7 @@
             "duration": 1024,
             "duration_time": "0.023220",
             "size": "2048",
-            "pos": "647",
+            "pos": "669",
             "flags": "K_"
         },
         {
@@ -27,7 +27,7 @@
             "best_effort_timestamp_time": "0.000000",
             "pkt_duration": 1024,
             "pkt_duration_time": "0.023220",
-            "pkt_pos": "647",
+            "pkt_pos": "669",
             "pkt_size": "2048",
             "sample_fmt": "s16",
             "nb_samples": 1024,
@@ -44,7 +44,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "230400",
-            "pos": "2722",
+            "pos": "2744",
             "flags": "K_"
         },
         {
@@ -60,7 +60,7 @@
             "best_effort_timestamp_time": "0.000000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "2722",
+            "pkt_pos": "2744",
             "pkt_size": "230400",
             "width": 320,
             "height": 240,
@@ -84,7 +84,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "30000",
-            "pos": "233143",
+            "pos": "233165",
             "flags": "K_"
         },
         {
@@ -100,7 +100,7 @@
             "best_effort_timestamp_time": "0.000000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "233143",
+            "pkt_pos": "233165",
             "pkt_size": "30000",
             "width": 100,
             "height": 100,
@@ -124,7 +124,7 @@
             "duration": 1024,
             "duration_time": "0.023220",
             "size": "2048",
-            "pos": "263148",
+            "pos": "263170",
             "flags": "K_"
         },
         {
@@ -140,7 +140,7 @@
             "best_effort_timestamp_time": "0.023220",
             "pkt_duration": 1024,
             "pkt_duration_time": "0.023220",
-            "pkt_pos": "263148",
+            "pkt_pos": "263170",
             "pkt_size": "2048",
             "sample_fmt": "s16",
             "nb_samples": 1024,
@@ -157,7 +157,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "230400",
-            "pos": "265226",
+            "pos": "265248",
             "flags": "K_"
         },
         {
@@ -173,7 +173,7 @@
             "best_effort_timestamp_time": "0.040000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "265226",
+            "pkt_pos": "265248",
             "pkt_size": "230400",
             "width": 320,
             "height": 240,
@@ -197,7 +197,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "30000",
-            "pos": "495650",
+            "pos": "495672",
             "flags": "K_"
         },
         {
@@ -213,7 +213,7 @@
             "best_effort_timestamp_time": "0.040000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "495650",
+            "pkt_pos": "495672",
             "pkt_size": "30000",
             "width": 100,
             "height": 100,
@@ -237,7 +237,7 @@
             "duration": 1024,
             "duration_time": "0.023220",
             "size": "2048",
-            "pos": "525655",
+            "pos": "525677",
             "flags": "K_"
         },
         {
@@ -253,7 +253,7 @@
             "best_effort_timestamp_time": "0.046440",
             "pkt_duration": 1024,
             "pkt_duration_time": "0.023220",
-            "pkt_pos": "525655",
+            "pkt_pos": "525677",
             "pkt_size": "2048",
             "sample_fmt": "s16",
             "nb_samples": 1024,
@@ -270,7 +270,7 @@
             "duration": 1024,
             "duration_time": "0.023220",
             "size": "2048",
-            "pos": "527726",
+            "pos": "527748",
             "flags": "K_"
         },
         {
@@ -286,7 +286,7 @@
             "best_effort_timestamp_time": "0.069660",
             "pkt_duration": 1024,
             "pkt_duration_time": "0.023220",
-            "pkt_pos": "527726",
+            "pkt_pos": "527748",
             "pkt_size": "2048",
             "sample_fmt": "s16",
             "nb_samples": 1024,
@@ -303,7 +303,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "230400",
-            "pos": "529804",
+            "pos": "529826",
             "flags": "K_"
         },
         {
@@ -319,7 +319,7 @@
             "best_effort_timestamp_time": "0.080000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "529804",
+            "pkt_pos": "529826",
             "pkt_size": "230400",
             "width": 320,
             "height": 240,
@@ -343,7 +343,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "30000",
-            "pos": "760228",
+            "pos": "760250",
             "flags": "K_"
         },
         {
@@ -359,7 +359,7 @@
             "best_effort_timestamp_time": "0.080000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "760228",
+            "pkt_pos": "760250",
             "pkt_size": "30000",
             "width": 100,
             "height": 100,
@@ -383,7 +383,7 @@
             "duration": 1024,
             "duration_time": "0.023220",
             "size": "2048",
-            "pos": "790233",
+            "pos": "790255",
             "flags": "K_"
         },
         {
@@ -399,7 +399,7 @@
             "best_effort_timestamp_time": "0.092880",
             "pkt_duration": 1024,
             "pkt_duration_time": "0.023220",
-            "pkt_pos": "790233",
+            "pkt_pos": "790255",
             "pkt_size": "2048",
             "sample_fmt": "s16",
             "nb_samples": 1024,
@@ -416,7 +416,7 @@
             "duration": 393,
             "duration_time": "0.008912",
             "size": "786",
-            "pos": "792304",
+            "pos": "792326",
             "flags": "K_"
         },
         {
@@ -432,7 +432,7 @@
             "best_effort_timestamp_time": "0.116100",
             "pkt_duration": 393,
             "pkt_duration_time": "0.008912",
-            "pkt_pos": "792304",
+            "pkt_pos": "792326",
             "pkt_size": "786",
             "sample_fmt": "s16",
             "nb_samples": 393,
@@ -449,7 +449,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "230400",
-            "pos": "793120",
+            "pos": "793142",
             "flags": "K_"
         },
         {
@@ -465,7 +465,7 @@
             "best_effort_timestamp_time": "0.120000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "793120",
+            "pkt_pos": "793142",
             "pkt_size": "230400",
             "width": 320,
             "height": 240,
@@ -489,7 +489,7 @@
             "duration": 2048,
             "duration_time": "0.040000",
             "size": "30000",
-            "pos": "1023544",
+            "pos": "1023566",
             "flags": "K_"
         },
         {
@@ -505,7 +505,7 @@
             "best_effort_timestamp_time": "0.120000",
             "pkt_duration": 2048,
             "pkt_duration_time": "0.040000",
-            "pkt_pos": "1023544",
+            "pkt_pos": "1023566",
             "pkt_size": "30000",
             "width": 100,
             "height": 100,
@@ -588,7 +588,7 @@
             "nb_read_frames": "4",
             "nb_read_packets": "4",
             "disposition": {
-                "default": 0,
+                "default": 1,
                 "dub": 0,
                 "original": 0,
                 "comment": 0,
@@ -668,8 +668,8 @@
         "format_name": "nut",
         "start_time": "0.000000",
         "duration": "0.120000",
-        "size": "1053624",
-        "bit_rate": "70241600",
+        "size": "1053646",
+        "bit_rate": "70243066",
         "probe_score": 100,
         "tags": {
             "title": "ffprobe test file",
diff --git a/tests/ref/fate/ffprobe_xml b/tests/ref/fate/ffprobe_xml
index 88623f0e11..4f702bc984 100644
--- a/tests/ref/fate/ffprobe_xml
+++ b/tests/ref/fate/ffprobe_xml
@@ -1,34 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ffprobe>
     <packets_and_frames>
-        <packet codec_type="audio" stream_index="0" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="1024" duration_time="0.023220" size="2048" pos="647" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="647" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="230400" pos="2722" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="2722" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="30000" pos="233143" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="233143" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="audio" stream_index="0" pts="1024" pts_time="0.023220" dts="1024" dts_time="0.023220" duration="1024" duration_time="0.023220" size="2048" pos="263148" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="1024" pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" best_effort_timestamp="1024" best_effort_timestamp_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263148" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="230400" pos="265226" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="265226" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="30000" pos="495650" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="495650" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="audio" stream_index="0" pts="2048" pts_time="0.046440" dts="2048" dts_time="0.046440" duration="1024" duration_time="0.023220" size="2048" pos="525655" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="2048" pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" best_effort_timestamp="2048" best_effort_timestamp_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525655" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="audio" stream_index="0" pts="3072" pts_time="0.069660" dts="3072" dts_time="0.069660" duration="1024" duration_time="0.023220" size="2048" pos="527726" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="3072" pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" best_effort_timestamp="3072" best_effort_timestamp_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527726" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="230400" pos="529804" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="529804" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="30000" pos="760228" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="760228" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="audio" stream_index="0" pts="4096" pts_time="0.092880" dts="4096" dts_time="0.092880" duration="1024" duration_time="0.023220" size="2048" pos="790233" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="4096" pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" best_effort_timestamp="4096" best_effort_timestamp_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790233" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="audio" stream_index="0" pts="5120" pts_time="0.116100" dts="5120" dts_time="0.116100" duration="393" duration_time="0.008912" size="786" pos="792304" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="5120" pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" best_effort_timestamp="5120" best_effort_timestamp_time="0.116100" pkt_duration="393" pkt_duration_time="0.008912" pkt_pos="792304" pkt_size="786" sample_fmt="s16" nb_samples="393" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="230400" pos="793120" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="793120" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="30000" pos="1023544" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="1023544" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="1024" duration_time="0.023220" size="2048" pos="669" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="669" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="230400" pos="2744" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="2744" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="30000" pos="233165" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="233165" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="1024" pts_time="0.023220" dts="1024" dts_time="0.023220" duration="1024" duration_time="0.023220" size="2048" pos="263170" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="1024" pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" best_effort_timestamp="1024" best_effort_timestamp_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263170" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="230400" pos="265248" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="265248" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="30000" pos="495672" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="495672" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="2048" pts_time="0.046440" dts="2048" dts_time="0.046440" duration="1024" duration_time="0.023220" size="2048" pos="525677" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="2048" pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" best_effort_timestamp="2048" best_effort_timestamp_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525677" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="audio" stream_index="0" pts="3072" pts_time="0.069660" dts="3072" dts_time="0.069660" duration="1024" duration_time="0.023220" size="2048" pos="527748" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="3072" pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" best_effort_timestamp="3072" best_effort_timestamp_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527748" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="230400" pos="529826" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="529826" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="30000" pos="760250" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="760250" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="4096" pts_time="0.092880" dts="4096" dts_time="0.092880" duration="1024" duration_time="0.023220" size="2048" pos="790255" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="4096" pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" best_effort_timestamp="4096" best_effort_timestamp_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790255" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="audio" stream_index="0" pts="5120" pts_time="0.116100" dts="5120" dts_time="0.116100" duration="393" duration_time="0.008912" size="786" pos="792326" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="5120" pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" best_effort_timestamp="5120" best_effort_timestamp_time="0.116100" pkt_duration="393" pkt_duration_time="0.008912" pkt_pos="792326" pkt_size="786" sample_fmt="s16" nb_samples="393" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="230400" pos="793142" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="793142" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="30000" pos="1023566" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="1023566" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
     </packets_and_frames>
 
     <streams>
@@ -38,7 +38,7 @@
             <tag key="encoder" value="Lavc pcm_s16le"/>
         </stream>
         <stream index="1" codec_name="rawvideo" codec_type="video" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="320" height="240" coded_width="320" coded_height="240" closed_captions="0" film_grain="0" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" refs="1" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/51200" start_pts="0" start_time="0.000000" nb_read_frames="4" nb_read_packets="4">
-            <disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0" captions="0" descriptions="0" metadata="0" dependent="0" still_image="0"/>
+            <disposition default="1" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0" captions="0" descriptions="0" metadata="0" dependent="0" still_image="0"/>
             <tag key="title" value="foobar"/>
             <tag key="duration_ts" value="field-and-tags-conflict-attempt"/>
             <tag key="encoder" value="Lavc rawvideo"/>
@@ -49,7 +49,7 @@
         </stream>
     </streams>
 
-    <format filename="tests/data/ffprobe-test.nut" nb_streams="3" nb_programs="0" format_name="nut" start_time="0.000000" duration="0.120000" size="1053624" bit_rate="70241600" probe_score="100">
+    <format filename="tests/data/ffprobe-test.nut" nb_streams="3" nb_programs="0" format_name="nut" start_time="0.000000" duration="0.120000" size="1053646" bit_rate="70243066" probe_score="100">
         <tag key="title" value="ffprobe test file"/>
         <tag key="comment" value="'A comment with CSV, XML & JSON special chars': <tag value="x">"/>
         <tag key="comment2" value="I ♥ Üñîçød€"/>
diff --git a/tests/ref/fate/ffprobe_xsd b/tests/ref/fate/ffprobe_xsd
index c4a6bf86d2..62d011ad9c 100644
--- a/tests/ref/fate/ffprobe_xsd
+++ b/tests/ref/fate/ffprobe_xsd
@@ -1,34 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ffprobe:ffprobe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ffprobe="http://www.ffmpeg.org/schema/ffprobe" xsi:schemaLocation="http://www.ffmpeg.org/schema/ffprobe ffprobe.xsd">
     <packets_and_frames>
-        <packet codec_type="audio" stream_index="0" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="1024" duration_time="0.023220" size="2048" pos="647" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="647" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="230400" pos="2722" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="2722" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="30000" pos="233143" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="233143" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="audio" stream_index="0" pts="1024" pts_time="0.023220" dts="1024" dts_time="0.023220" duration="1024" duration_time="0.023220" size="2048" pos="263148" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="1024" pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" best_effort_timestamp="1024" best_effort_timestamp_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263148" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="230400" pos="265226" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="265226" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="30000" pos="495650" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="495650" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="audio" stream_index="0" pts="2048" pts_time="0.046440" dts="2048" dts_time="0.046440" duration="1024" duration_time="0.023220" size="2048" pos="525655" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="2048" pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" best_effort_timestamp="2048" best_effort_timestamp_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525655" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="audio" stream_index="0" pts="3072" pts_time="0.069660" dts="3072" dts_time="0.069660" duration="1024" duration_time="0.023220" size="2048" pos="527726" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="3072" pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" best_effort_timestamp="3072" best_effort_timestamp_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527726" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="230400" pos="529804" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="529804" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="30000" pos="760228" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="760228" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="audio" stream_index="0" pts="4096" pts_time="0.092880" dts="4096" dts_time="0.092880" duration="1024" duration_time="0.023220" size="2048" pos="790233" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="4096" pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" best_effort_timestamp="4096" best_effort_timestamp_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790233" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
-        <packet codec_type="audio" stream_index="0" pts="5120" pts_time="0.116100" dts="5120" dts_time="0.116100" duration="393" duration_time="0.008912" size="786" pos="792304" flags="K_"/>
-        <frame media_type="audio" stream_index="0" key_frame="1" pts="5120" pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" best_effort_timestamp="5120" best_effort_timestamp_time="0.116100" pkt_duration="393" pkt_duration_time="0.008912" pkt_pos="792304" pkt_size="786" sample_fmt="s16" nb_samples="393" channels="1"/>
-        <packet codec_type="video" stream_index="1" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="230400" pos="793120" flags="K_"/>
-        <frame media_type="video" stream_index="1" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="793120" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
-        <packet codec_type="video" stream_index="2" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="30000" pos="1023544" flags="K_"/>
-        <frame media_type="video" stream_index="2" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="1023544" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="1024" duration_time="0.023220" size="2048" pos="669" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="669" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="230400" pos="2744" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="2744" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="0" pts_time="0.000000" dts="0" dts_time="0.000000" duration="2048" duration_time="0.040000" size="30000" pos="233165" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="0" pts_time="0.000000" pkt_dts="0" pkt_dts_time="0.000000" best_effort_timestamp="0" best_effort_timestamp_time="0.000000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="233165" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="1024" pts_time="0.023220" dts="1024" dts_time="0.023220" duration="1024" duration_time="0.023220" size="2048" pos="263170" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="1024" pts_time="0.023220" pkt_dts="1024" pkt_dts_time="0.023220" best_effort_timestamp="1024" best_effort_timestamp_time="0.023220" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="263170" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="230400" pos="265248" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="265248" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="2048" pts_time="0.040000" dts="2048" dts_time="0.040000" duration="2048" duration_time="0.040000" size="30000" pos="495672" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="2048" pts_time="0.040000" pkt_dts="2048" pkt_dts_time="0.040000" best_effort_timestamp="2048" best_effort_timestamp_time="0.040000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="495672" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="2048" pts_time="0.046440" dts="2048" dts_time="0.046440" duration="1024" duration_time="0.023220" size="2048" pos="525677" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="2048" pts_time="0.046440" pkt_dts="2048" pkt_dts_time="0.046440" best_effort_timestamp="2048" best_effort_timestamp_time="0.046440" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="525677" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="audio" stream_index="0" pts="3072" pts_time="0.069660" dts="3072" dts_time="0.069660" duration="1024" duration_time="0.023220" size="2048" pos="527748" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="3072" pts_time="0.069660" pkt_dts="3072" pkt_dts_time="0.069660" best_effort_timestamp="3072" best_effort_timestamp_time="0.069660" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="527748" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="230400" pos="529826" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="529826" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="4096" pts_time="0.080000" dts="4096" dts_time="0.080000" duration="2048" duration_time="0.040000" size="30000" pos="760250" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="4096" pts_time="0.080000" pkt_dts="4096" pkt_dts_time="0.080000" best_effort_timestamp="4096" best_effort_timestamp_time="0.080000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="760250" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="audio" stream_index="0" pts="4096" pts_time="0.092880" dts="4096" dts_time="0.092880" duration="1024" duration_time="0.023220" size="2048" pos="790255" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="4096" pts_time="0.092880" pkt_dts="4096" pkt_dts_time="0.092880" best_effort_timestamp="4096" best_effort_timestamp_time="0.092880" pkt_duration="1024" pkt_duration_time="0.023220" pkt_pos="790255" pkt_size="2048" sample_fmt="s16" nb_samples="1024" channels="1"/>
+        <packet codec_type="audio" stream_index="0" pts="5120" pts_time="0.116100" dts="5120" dts_time="0.116100" duration="393" duration_time="0.008912" size="786" pos="792326" flags="K_"/>
+        <frame media_type="audio" stream_index="0" key_frame="1" pts="5120" pts_time="0.116100" pkt_dts="5120" pkt_dts_time="0.116100" best_effort_timestamp="5120" best_effort_timestamp_time="0.116100" pkt_duration="393" pkt_duration_time="0.008912" pkt_pos="792326" pkt_size="786" sample_fmt="s16" nb_samples="393" channels="1"/>
+        <packet codec_type="video" stream_index="1" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="230400" pos="793142" flags="K_"/>
+        <frame media_type="video" stream_index="1" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="793142" pkt_size="230400" width="320" height="240" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
+        <packet codec_type="video" stream_index="2" pts="6144" pts_time="0.120000" dts="6144" dts_time="0.120000" duration="2048" duration_time="0.040000" size="30000" pos="1023566" flags="K_"/>
+        <frame media_type="video" stream_index="2" key_frame="1" pts="6144" pts_time="0.120000" pkt_dts="6144" pkt_dts_time="0.120000" best_effort_timestamp="6144" best_effort_timestamp_time="0.120000" pkt_duration="2048" pkt_duration_time="0.040000" pkt_pos="1023566" pkt_size="30000" width="100" height="100" pix_fmt="rgb24" sample_aspect_ratio="1:1" pict_type="I" coded_picture_number="0" display_picture_number="0" interlaced_frame="0" top_field_first="0" repeat_pict="0"/>
     </packets_and_frames>
 
     <streams>
@@ -38,7 +38,7 @@
             <tag key="encoder" value="Lavc pcm_s16le"/>
         </stream>
         <stream index="1" codec_name="rawvideo" codec_type="video" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="320" height="240" coded_width="320" coded_height="240" closed_captions="0" film_grain="0" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" refs="1" r_frame_rate="25/1" avg_frame_rate="25/1" time_base="1/51200" start_pts="0" start_time="0.000000" nb_read_frames="4" nb_read_packets="4">
-            <disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0" captions="0" descriptions="0" metadata="0" dependent="0" still_image="0"/>
+            <disposition default="1" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0" timed_thumbnails="0" captions="0" descriptions="0" metadata="0" dependent="0" still_image="0"/>
             <tag key="title" value="foobar"/>
             <tag key="duration_ts" value="field-and-tags-conflict-attempt"/>
             <tag key="encoder" value="Lavc rawvideo"/>
@@ -49,7 +49,7 @@
         </stream>
     </streams>
 
-    <format filename="tests/data/ffprobe-test.nut" nb_streams="3" nb_programs="0" format_name="nut" start_time="0.000000" duration="0.120000" size="1053624" bit_rate="70241600" probe_score="100">
+    <format filename="tests/data/ffprobe-test.nut" nb_streams="3" nb_programs="0" format_name="nut" start_time="0.000000" duration="0.120000" size="1053646" bit_rate="70243066" probe_score="100">
         <tag key="title" value="ffprobe test file"/>
         <tag key="comment" value="'A comment with CSV, XML & JSON special chars': <tag value="x">"/>
         <tag key="comment2" value="I ♥ Üñîçød€"/>
diff --git a/tests/ref/fate/matroska-mastering-display-metadata b/tests/ref/fate/matroska-mastering-display-metadata
index 627a8c103e..8f5d7b6a22 100644
--- a/tests/ref/fate/matroska-mastering-display-metadata
+++ b/tests/ref/fate/matroska-mastering-display-metadata
@@ -1,5 +1,5 @@
-4f97d718f706e241df9f6c95ac1c721a *tests/data/fate/matroska-mastering-display-metadata.matroska
-1669701 tests/data/fate/matroska-mastering-display-metadata.matroska
+542ababe5c088ab925ee49373d8b8a85 *tests/data/fate/matroska-mastering-display-metadata.matroska
+1669695 tests/data/fate/matroska-mastering-display-metadata.matroska
 #extradata 0:        4, 0x040901a3
 #extradata 3:      200, 0x506463a8
 #tb 0: 1/1000



More information about the ffmpeg-cvslog mailing list