avconv: make -t insert trim/atrim filters.
authorAnton Khirnov <anton@khirnov.net>
Wed, 10 Apr 2013 13:02:01 +0000 (15:02 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 30 Apr 2013 09:53:12 +0000 (11:53 +0200)
This makes -t sample-accurate for audio and will allow further
simplication in the future.

Most of the FATE changes are due to audio now being sample accurate. In
some cases a video frame was incorrectly passed with the old code, while
its was over the limit.

43 files changed:
Changelog
avconv.c
avconv_filter.c
tests/ref/fate/adpcm-ms-mono
tests/ref/fate/bethsoft-vid
tests/ref/fate/cyberia-c93
tests/ref/fate/msvideo1-8bit
tests/ref/lavf/aiff
tests/ref/lavf/alaw
tests/ref/lavf/asf
tests/ref/lavf/au
tests/ref/lavf/avi
tests/ref/lavf/bmp
tests/ref/lavf/dpx
tests/ref/lavf/ffm
tests/ref/lavf/gxf
tests/ref/lavf/jpg
tests/ref/lavf/mkv
tests/ref/lavf/mmf
tests/ref/lavf/mov
tests/ref/lavf/mpg
tests/ref/lavf/mulaw
tests/ref/lavf/nut
tests/ref/lavf/ogg
tests/ref/lavf/pam
tests/ref/lavf/pcx
tests/ref/lavf/pgm
tests/ref/lavf/png
tests/ref/lavf/ppm
tests/ref/lavf/rm
tests/ref/lavf/rso
tests/ref/lavf/sgi
tests/ref/lavf/sox
tests/ref/lavf/sunrast
tests/ref/lavf/tga
tests/ref/lavf/tiff
tests/ref/lavf/ts
tests/ref/lavf/voc
tests/ref/lavf/voc_s16
tests/ref/lavf/wav
tests/ref/lavf/xwd
tests/ref/seek/lavf-alaw
tests/ref/seek/lavf-mulaw

index 23ed1b4..ca5dbac 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -14,6 +14,7 @@ version 10:
 - JPEG 2000 decoder
 - new asetpts filter (same as setpts, but for audio)
 - new trim and atrim filters
+- avconv -t option is now sample-accurate when transcoding audio
 
 
 version 9:
index 658dadc..3b50f20 100644 (file)
--- a/avconv.c
+++ b/avconv.c
@@ -380,9 +380,6 @@ static void do_audio_out(AVFormatContext *s, OutputStream *ost,
     pkt.data = NULL;
     pkt.size = 0;
 
-    if (!check_recording_time(ost))
-        return;
-
     if (frame->pts == AV_NOPTS_VALUE || audio_sync_method < 0)
         frame->pts = ost->sync_opts;
     ost->sync_opts = frame->pts + frame->nb_samples;
@@ -549,8 +546,7 @@ static void do_video_out(AVFormatContext *s,
     pkt.data = NULL;
     pkt.size = 0;
 
-    if (!check_recording_time(ost) ||
-        ost->frame_number >= ost->max_frames)
+    if (ost->frame_number >= ost->max_frames)
         return;
 
     if (s->oformat->flags & AVFMT_RAWPICTURE &&
index 7edcbf6..0a47c95 100644 (file)
@@ -173,6 +173,52 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
     ist->filters[ist->nb_filters - 1] = fg->inputs[fg->nb_inputs - 1];
 }
 
+static int insert_trim(OutputStream *ost, AVFilterContext **last_filter, int *pad_idx)
+{
+    OutputFile *of = output_files[ost->file_index];
+    AVFilterGraph *graph = (*last_filter)->graph;
+    AVFilterContext *ctx;
+    const AVFilter *trim;
+    const char *name = ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO ? "trim" : "atrim";
+    char filter_name[128];
+    int ret = 0;
+
+    if (of->recording_time == INT64_MAX)
+        return 0;
+
+    trim = avfilter_get_by_name(name);
+    if (!trim) {
+        av_log(NULL, AV_LOG_ERROR, "%s filter not present, cannot limit "
+               "recording time.\n", name);
+        return AVERROR_FILTER_NOT_FOUND;
+    }
+
+    snprintf(filter_name, sizeof(filter_name), "%s for output stream %d:%d",
+             name, ost->file_index, ost->index);
+    ctx = avfilter_graph_alloc_filter(graph, trim, filter_name);
+    if (!ctx)
+        return AVERROR(ENOMEM);
+
+    ret = av_opt_set_double(ctx, "duration", (double)of->recording_time / 1e6,
+                            AV_OPT_SEARCH_CHILDREN);
+    if (ret < 0) {
+        av_log(ctx, AV_LOG_ERROR, "Error configuring the %s filter", name);
+        return ret;
+    }
+
+    ret = avfilter_init_str(ctx, NULL);
+    if (ret < 0)
+        return ret;
+
+    ret = avfilter_link(*last_filter, *pad_idx, ctx, 0);
+    if (ret < 0)
+        return ret;
+
+    *last_filter = ctx;
+    *pad_idx     = 0;
+    return 0;
+}
+
 static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
 {
     char *pix_fmts;
@@ -247,6 +293,11 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
         pad_idx = 0;
     }
 
+    ret = insert_trim(ost, &last_filter, &pad_idx);
+    if (ret < 0)
+        return ret;
+
+
     if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0)
         return ret;
 
@@ -313,6 +364,10 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
         pad_idx = 0;
     }
 
+    ret = insert_trim(ost, &last_filter, &pad_idx);
+    if (ret < 0)
+        return ret;
+
     if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0)
         return ret;
 
index 3bf44f8..c456708 100644 (file)
@@ -43,4 +43,4 @@
 0,      20500,      20500,      500,     1000, 0xf195eb44
 0,      21000,      21000,      500,     1000, 0xa491f3ef
 0,      21500,      21500,      500,     1000, 0x2c036e18
-0,      22000,      22000,      500,     1000, 0x52d65e2a
+0,      22000,      22000,       50,      100, 0x0bd81f05
index a4c049e..535888b 100644 (file)
 1,      53835,      53835,      925,     1850, 0x5a303d1a
 0,        296,        296,        1,   192000, 0x79b7417b
 1,      54760,      54760,      537,     1074, 0x142ce7ba
-1,      55297,      55297,      925,     1850, 0x7ff682f7
-0,        300,        300,        1,   192000, 0x468d8db4
+1,      55297,      55297,      258,      516, 0x98885b26
index 2c71e50..f02435c 100644 (file)
@@ -36,7 +36,7 @@
 0,         30,         30,        1,   184320, 0x54975910
 0,         31,         31,        1,   184320, 0xf4857db9
 0,         32,         32,        1,   184320, 0x82d18161
-1,      42552,      42552,    14184,    28368, 0x9101e519
+1,      42552,      42552,     5835,    11670, 0x04aa0b1e
 0,         33,         33,        1,   184320, 0x06d93bd0
 0,         34,         34,        1,   184320, 0xa4304c00
 0,         35,         35,        1,   184320, 0x5f77d9cd
index 6e6bc0b..74d54e8 100644 (file)
@@ -29,4 +29,3 @@
 0,         27,         27,        1,    57600, 0x4ec4a868
 0,         28,         28,        1,    57600, 0x7db370a1
 0,         29,         29,        1,    57600, 0x2b1e52f6
-0,         30,         30,        1,    57600, 0x2141467c
index e5d6fc3..c713d02 100644 (file)
@@ -1,3 +1,3 @@
-379908755146d4ead062abe9c3b5c582 *./tests/data/lavf/lavf.aif
-90166 ./tests/data/lavf/lavf.aif
-./tests/data/lavf/lavf.aif CRC=0xf1ae5536
+9d9e55431800bf6aea46a7d67509da4e *./tests/data/lavf/lavf.aif
+88254 ./tests/data/lavf/lavf.aif
+./tests/data/lavf/lavf.aif CRC=0x3a1da17e
index 65bcf99..d93d6fc 100644 (file)
@@ -1,3 +1,3 @@
-8bce9c3758b0d38da2e0718b6ab57fb4 *./tests/data/lavf/lavf.al
-45056 ./tests/data/lavf/lavf.al
-./tests/data/lavf/lavf.al CRC=0x5e6d372b
+652d96e474869ddb01403743deb35117 *./tests/data/lavf/lavf.al
+44100 ./tests/data/lavf/lavf.al
+./tests/data/lavf/lavf.al CRC=0xf9643112
index ec3c871..572cfc5 100644 (file)
@@ -1,3 +1,3 @@
-93b1cbdb36d7306f7d31392c8cb9fed8 *./tests/data/lavf/lavf.asf
+327385dd5f418faa6237089a40159b78 *./tests/data/lavf/lavf.asf
 333375 ./tests/data/lavf/lavf.asf
-./tests/data/lavf/lavf.asf CRC=0x51485213
+./tests/data/lavf/lavf.asf CRC=0xf6340a10
index 15f2a4b..71cfdcb 100644 (file)
@@ -1,3 +1,3 @@
-dbd11f783219485cae32024e47c19dfb *./tests/data/lavf/lavf.au
-90136 ./tests/data/lavf/lavf.au
-./tests/data/lavf/lavf.au CRC=0xf1ae5536
+b9396e3775ea009094e751e7128d614e *./tests/data/lavf/lavf.au
+88224 ./tests/data/lavf/lavf.au
+./tests/data/lavf/lavf.au CRC=0x3a1da17e
index 50646aa..08ae042 100644 (file)
@@ -1,3 +1,3 @@
-e6319b86a4422a8317124fc4cc693f8c *./tests/data/lavf/lavf.avi
+e2e7b7ceaf038b259558f41df203ded9 *./tests/data/lavf/lavf.avi
 330786 ./tests/data/lavf/lavf.avi
-./tests/data/lavf/lavf.avi CRC=0xa79b84dd
+./tests/data/lavf/lavf.avi CRC=0x4c963cda
index 8958855..b79ee4d 100644 (file)
@@ -1,3 +1,3 @@
 71f4d64a6b3c71f43a4eff526f84841c *./tests/data/images/bmp/02.bmp
-./tests/data/images/bmp/%02d.bmp CRC=0xe6c71946
+./tests/data/images/bmp/%02d.bmp CRC=0x3447369b
 304182 ./tests/data/images/bmp/02.bmp
index a852ae0..a9f1169 100644 (file)
@@ -1,3 +1,3 @@
 808ea110635774252439722a48329d61 *./tests/data/images/dpx/02.dpx
-./tests/data/images/dpx/%02d.dpx CRC=0x6da01946
+./tests/data/images/dpx/%02d.dpx CRC=0x28c7369b
 305792 ./tests/data/images/dpx/02.dpx
index 8921544..7518a81 100644 (file)
@@ -1,3 +1,3 @@
-c5dcf5950031020864db57bbde0064df *./tests/data/lavf/lavf.ffm
+f3f0c42283b75bc826f499f048085c27 *./tests/data/lavf/lavf.ffm
 376832 ./tests/data/lavf/lavf.ffm
-./tests/data/lavf/lavf.ffm CRC=0x38388ba1
+./tests/data/lavf/lavf.ffm CRC=0xdd24439e
index 0d28ac5..e25d4f2 100644 (file)
@@ -1,3 +1,3 @@
-32e34e23f3740e27e5bcf1621a698aad *./tests/data/lavf/lavf.gxf
+eaa16531d0b2f3e3ade2186cf33dbf86 *./tests/data/lavf/lavf.gxf
 796392 ./tests/data/lavf/lavf.gxf
-./tests/data/lavf/lavf.gxf CRC=0x4f52fc7f
+./tests/data/lavf/lavf.gxf CRC=0xd04c769f
index 9e5be55..584a97a 100644 (file)
@@ -1,3 +1,3 @@
 131878fee153a086d740543fbf2ab359 *./tests/data/images/jpg/02.jpg
-./tests/data/images/jpg/%02d.jpg CRC=0x8b019f23
+./tests/data/images/jpg/%02d.jpg CRC=0x9d770966
 28406 ./tests/data/images/jpg/02.jpg
index cb3bcc7..4a12f89 100644 (file)
@@ -1,3 +1,3 @@
-af61b3dcd6a9d2608c2368136c96b437 *./tests/data/lavf/lavf.mkv
+7aa1846929e5fa4f5f2b1a0bc243218f *./tests/data/lavf/lavf.mkv
 320262 ./tests/data/lavf/lavf.mkv
-./tests/data/lavf/lavf.mkv CRC=0xd86284dd
+./tests/data/lavf/lavf.mkv CRC=0x7d5d3cda
index 756527c..0614051 100644 (file)
@@ -1,3 +1,3 @@
-272b91d8fc31ed43b08246d182719751 *./tests/data/lavf/lavf.mmf
+19625430b231dd130dbb0c13de1036fa *./tests/data/lavf/lavf.mmf
 22609 ./tests/data/lavf/lavf.mmf
-./tests/data/lavf/lavf.mmf CRC=0x03633476
+./tests/data/lavf/lavf.mmf CRC=0x8dea1388
index 2db01d4..f73cd4f 100644 (file)
@@ -1,3 +1,3 @@
-a5c982910b1a1547db68ffa35cc2a05a *./tests/data/lavf/lavf.mov
-357741 ./tests/data/lavf/lavf.mov
-./tests/data/lavf/lavf.mov CRC=0x2f6a9b26
+8404cccff020ab07fbfe9c713bc98c33 *./tests/data/lavf/lavf.mov
+356797 ./tests/data/lavf/lavf.mov
+./tests/data/lavf/lavf.mov CRC=0xe3f4950d
index d858bb5..e4c8ae0 100644 (file)
@@ -1,3 +1,3 @@
-253f28e374d51d264926c91e36043943 *./tests/data/lavf/lavf.mpg
+7df31ba8a5909e3c88b1d1a3f93c4ec2 *./tests/data/lavf/lavf.mpg
 372736 ./tests/data/lavf/lavf.mpg
-./tests/data/lavf/lavf.mpg CRC=0x38388ba1
+./tests/data/lavf/lavf.mpg CRC=0xdd24439e
index c6fa058..bd54084 100644 (file)
@@ -1,3 +1,3 @@
-e64027a96ad5907ee281deff3286da0a *./tests/data/lavf/lavf.ul
-45056 ./tests/data/lavf/lavf.ul
-./tests/data/lavf/lavf.ul CRC=0xe028b50a
+ad492935e361f830f2f8302aa102701d *./tests/data/lavf/lavf.ul
+44100 ./tests/data/lavf/lavf.ul
+./tests/data/lavf/lavf.ul CRC=0x4515fa26
index e658434..d7a8ab1 100644 (file)
@@ -1,3 +1,3 @@
-7e44a8ed5ff2fe5442f758d48fe1b496 *./tests/data/lavf/lavf.nut
+8c9d5193a672ad0dee90f0712acc3a31 *./tests/data/lavf/lavf.nut
 319680 ./tests/data/lavf/lavf.nut
-./tests/data/lavf/lavf.nut CRC=0xa79b84dd
+./tests/data/lavf/lavf.nut CRC=0x4c963cda
index 7bc66a3..ea827ac 100644 (file)
@@ -1,3 +1,3 @@
-37147a98d9a484208389efa6a1f8796f *./tests/data/lavf/lavf.ogg
-13966 ./tests/data/lavf/lavf.ogg
-./tests/data/lavf/lavf.ogg CRC=0x37a143ea
+8ca901bc8d24b80ebe79e387e454d1e9 *./tests/data/lavf/lavf.ogg
+13476 ./tests/data/lavf/lavf.ogg
+./tests/data/lavf/lavf.ogg CRC=0x3a1da17e
index e53132a..636a419 100644 (file)
@@ -1,3 +1,3 @@
 0dce5565222cf0f8b309467f279aecd2 *./tests/data/images/pam/02.pam
-./tests/data/images/pam/%02d.pam CRC=0x6da01946
+./tests/data/images/pam/%02d.pam CRC=0x28c7369b
 304191 ./tests/data/images/pam/02.pam
index bdb2204..e60ea78 100644 (file)
@@ -1,3 +1,3 @@
 2df1d747fba23d03b6ff9c91b8b465c9 *./tests/data/images/pcx/02.pcx
-./tests/data/images/pcx/%02d.pcx CRC=0x6da01946
+./tests/data/images/pcx/%02d.pcx CRC=0x28c7369b
 364147 ./tests/data/images/pcx/02.pcx
index 4043f7a..419fdaa 100644 (file)
@@ -1,3 +1,3 @@
 388f5c51a678ca6a52cc006095c12f08 *./tests/data/images/pgm/02.pgm
-./tests/data/images/pgm/%02d.pgm CRC=0x418d2963
+./tests/data/images/pgm/%02d.pgm CRC=0xa6866b82
 101391 ./tests/data/images/pgm/02.pgm
index 4343adb..f216e7e 100644 (file)
@@ -1,3 +1,3 @@
 c162094e51dc1a3203de43e496086dfd *./tests/data/images/png/02.png
-./tests/data/images/png/%02d.png CRC=0x6da01946
+./tests/data/images/png/%02d.png CRC=0x28c7369b
 248612 ./tests/data/images/png/02.png
index 97093aa..33275e2 100644 (file)
@@ -1,3 +1,3 @@
 16d5dadf0b362fc8ba3cb676c5dde985 *./tests/data/images/ppm/02.ppm
-./tests/data/images/ppm/%02d.ppm CRC=0x6da01946
+./tests/data/images/ppm/%02d.ppm CRC=0x28c7369b
 304143 ./tests/data/images/ppm/02.ppm
index 188d15d..993310d 100644 (file)
@@ -1,2 +1,2 @@
-c002d460bc77043ced69fd00f4ae7968 *./tests/data/lavf/lavf.rm
+9eeb3b91c0a45f519fd7f2efea882cf4 *./tests/data/lavf/lavf.rm
 346414 ./tests/data/lavf/lavf.rm
index 648c248..5878f43 100644 (file)
@@ -1,3 +1,3 @@
-f41fd78f7df981802e7caeb23648b8c0 *./tests/data/lavf/lavf.rso
-45064 ./tests/data/lavf/lavf.rso
-./tests/data/lavf/lavf.rso CRC=0x74b2b546
+443b72346065d6318ca18c8395aa1d87 *./tests/data/lavf/lavf.rso
+44108 ./tests/data/lavf/lavf.rso
+./tests/data/lavf/lavf.rso CRC=0x298fd284
index a43c1f4..b0cd303 100644 (file)
@@ -1,3 +1,3 @@
 7054acafd275e51cec28d4518e213081 *./tests/data/images/sgi/02.sgi
-./tests/data/images/sgi/%02d.sgi CRC=0x6da01946
+./tests/data/images/sgi/%02d.sgi CRC=0x28c7369b
 308151 ./tests/data/images/sgi/02.sgi
index 0026480..fc368b1 100644 (file)
@@ -1,3 +1,3 @@
-e6f278256f145b69ed06f35b8d3585c1 *./tests/data/lavf/lavf.sox
-180256 ./tests/data/lavf/lavf.sox
-./tests/data/lavf/lavf.sox CRC=0xf1ae5536
+683635d5cb1344e44fa96df90c3a993c *./tests/data/lavf/lavf.sox
+176432 ./tests/data/lavf/lavf.sox
+./tests/data/lavf/lavf.sox CRC=0x3a1da17e
index 4db0505..097235b 100644 (file)
@@ -1,3 +1,3 @@
 07518bcb0841bc677ce6aea8464ea240 *./tests/data/images/sun/02.sun
-./tests/data/images/sun/%02d.sun CRC=0xe6c71946
+./tests/data/images/sun/%02d.sun CRC=0x3447369b
 304123 ./tests/data/images/sun/02.sun
index 7efaf97..ce6b646 100644 (file)
@@ -1,3 +1,3 @@
 c0305c53e6d79d4ed9f35f04f671246c *./tests/data/images/tga/02.tga
-./tests/data/images/tga/%02d.tga CRC=0xe6c71946
+./tests/data/images/tga/%02d.tga CRC=0x3447369b
 304172 ./tests/data/images/tga/02.tga
index 4b0b985..b636bd9 100644 (file)
@@ -1,3 +1,3 @@
 b3299346a8959553a437e486d8f3bf76 *./tests/data/images/tiff/02.tiff
-./tests/data/images/tiff/%02d.tiff CRC=0x6da01946
+./tests/data/images/tiff/%02d.tiff CRC=0x28c7369b
 307131 ./tests/data/images/tiff/02.tiff
index 0e8eeb6..0fe358b 100644 (file)
@@ -1,3 +1,3 @@
-8572cdd0cd589d1bc899264d7f1ead81 *./tests/data/lavf/lavf.ts
+647875edb0d1afb9fd0477cbfde3fe8b *./tests/data/lavf/lavf.ts
 406456 ./tests/data/lavf/lavf.ts
-./tests/data/lavf/lavf.ts CRC=0x0fdeb4df
+./tests/data/lavf/lavf.ts CRC=0xb4ca6cdc
index ea903b6..3131960 100644 (file)
@@ -1,3 +1,3 @@
-5c4ee01048e7a8a138a97e80cf7a1924 *./tests/data/lavf/lavf.voc
-45261 ./tests/data/lavf/lavf.voc
-./tests/data/lavf/lavf.voc CRC=0x74b2b546
+ae01db5200e569371d4c27316575344c *./tests/data/lavf/lavf.voc
+44305 ./tests/data/lavf/lavf.voc
+./tests/data/lavf/lavf.voc CRC=0x298fd284
index d53c950..deb7999 100644 (file)
@@ -1,3 +1,3 @@
-8ed10b311e49b4d4b18679b126492159 *./tests/data/lavf/lavf.s16.voc
-180437 ./tests/data/lavf/lavf.s16.voc
-./tests/data/lavf/lavf.s16.voc CRC=0x7bd585ff
+e55a9c632cfeab90bcfb9ff29a71728c *./tests/data/lavf/lavf.s16.voc
+176613 ./tests/data/lavf/lavf.s16.voc
+./tests/data/lavf/lavf.s16.voc CRC=0xe61e3bd0
index bbbacc3..fa8a859 100644 (file)
@@ -1,3 +1,3 @@
-8854ea97f2d2172383941b001c69228b *./tests/data/lavf/lavf.wav
-90158 ./tests/data/lavf/lavf.wav
-./tests/data/lavf/lavf.wav CRC=0xf1ae5536
+41410d9bbe0603740d1c17050746f475 *./tests/data/lavf/lavf.wav
+88246 ./tests/data/lavf/lavf.wav
+./tests/data/lavf/lavf.wav CRC=0x3a1da17e
index 41846c7..3fd20c8 100644 (file)
@@ -1,3 +1,3 @@
 50baa5560b7d1aa3188b19c1162bf7dc *./tests/data/images/xwd/02.xwd
-./tests/data/images/xwd/%02d.xwd CRC=0x6da01946
+./tests/data/images/xwd/%02d.xwd CRC=0x28c7369b
 304239 ./tests/data/images/xwd/02.xwd
index 84661ec..4b1f8fb 100644 (file)
@@ -38,7 +38,7 @@ ret: 0         st: 0 flags:1 dts: 0.200816 pts: 0.200816 pos:   4428 size:  1024
 ret: 0         st: 0 flags:0  ts:-0.904989
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:      0 size:  1024
 ret: 0         st: 0 flags:1  ts: 1.989161
-ret: 0         st: 0 flags:1 dts: 1.989161 pts: 1.989161 pos:  43861 size:  1024
+ret: 0         st: 0 flags:1 dts: 1.989161 pts: 1.989161 pos:  43861 size:   239
 ret: 0         st:-1 flags:0  ts: 0.883340
 ret: 0         st: 0 flags:1 dts: 0.883356 pts: 0.883356 pos:  19478 size:  1024
 ret: 0         st:-1 flags:1  ts:-0.222493
index 84661ec..4b1f8fb 100644 (file)
@@ -38,7 +38,7 @@ ret: 0         st: 0 flags:1 dts: 0.200816 pts: 0.200816 pos:   4428 size:  1024
 ret: 0         st: 0 flags:0  ts:-0.904989
 ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:      0 size:  1024
 ret: 0         st: 0 flags:1  ts: 1.989161
-ret: 0         st: 0 flags:1 dts: 1.989161 pts: 1.989161 pos:  43861 size:  1024
+ret: 0         st: 0 flags:1 dts: 1.989161 pts: 1.989161 pos:  43861 size:   239
 ret: 0         st:-1 flags:0  ts: 0.883340
 ret: 0         st: 0 flags:1 dts: 0.883356 pts: 0.883356 pos:  19478 size:  1024
 ret: 0         st:-1 flags:1  ts:-0.222493