[FFmpeg-devel] [PATCH] ff_put_wav_header: add flag to force WAVEFORMATEX
Daniel Verkamp
daniel at drv.nu
Wed Apr 30 04:26:05 CEST 2014
Partially undoes commit 2c4e08d89327595f7f4be57dda4b3775e1198d5e:
riff: always generate a proper WAVEFORMATEX structure in
ff_put_wav_header
A new flag, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX, is added to force the
use of WAVEFORMATEX rather than PCMWAVEFORMAT even for PCM codecs.
This flag is used in the Matroska muxer (the cause of the original
change) and in the ASF muxer, because the specifications for
these formats indicate explicitly that WAVEFORMATEX should be used.
Muxers for other formats will return to the original behavior of writing
PCMWAVEFORMAT when writing a header for raw PCM.
In particular, this causes raw PCM in WAV to generate the canonical
44-byte header expected by some tools.
---
libavformat/asfenc.c | 2 +-
libavformat/avienc.c | 2 +-
libavformat/matroskaenc.c | 2 +-
libavformat/movenc.c | 4 +-
libavformat/riff.h | 16 ++++++-
libavformat/riffenc.c | 9 ++--
libavformat/wavenc.c | 4 +-
libavformat/wtvenc.c | 2 +-
tests/fate/filter-audio.mak | 2 +-
tests/ref/acodec/adpcm-adx | 2 +-
tests/ref/acodec/adpcm-ima_qt | 2 +-
tests/ref/acodec/adpcm-ima_wav | 2 +-
tests/ref/acodec/adpcm-ms | 2 +-
tests/ref/acodec/adpcm-swf | 2 +-
tests/ref/acodec/adpcm-yamaha | 2 +-
tests/ref/acodec/alac | 2 +-
tests/ref/acodec/flac | 2 +-
tests/ref/acodec/g723_1 | 2 +-
tests/ref/acodec/mp2 | 2 +-
tests/ref/acodec/mp2fixed | 2 +-
tests/ref/acodec/pcm-alaw | 2 +-
tests/ref/acodec/pcm-f32be | 2 +-
tests/ref/acodec/pcm-f32le | 2 +-
tests/ref/acodec/pcm-f64be | 2 +-
tests/ref/acodec/pcm-f64le | 2 +-
tests/ref/acodec/pcm-mulaw | 2 +-
tests/ref/acodec/pcm-s16be | 2 +-
tests/ref/acodec/pcm-s16be_planar | 2 +-
tests/ref/acodec/pcm-s16le | 6 +--
tests/ref/acodec/pcm-s16le_planar | 2 +-
tests/ref/acodec/pcm-s24be | 2 +-
tests/ref/acodec/pcm-s24le | 2 +-
tests/ref/acodec/pcm-s24le_planar | 2 +-
tests/ref/acodec/pcm-s32be | 2 +-
tests/ref/acodec/pcm-s32le | 2 +-
tests/ref/acodec/pcm-s32le_planar | 2 +-
tests/ref/acodec/pcm-s8 | 2 +-
tests/ref/acodec/pcm-s8_planar | 2 +-
tests/ref/acodec/pcm-u16be | 2 +-
tests/ref/acodec/pcm-u16le | 2 +-
tests/ref/acodec/pcm-u24be | 2 +-
tests/ref/acodec/pcm-u24le | 2 +-
tests/ref/acodec/pcm-u32be | 2 +-
tests/ref/acodec/pcm-u32le | 2 +-
tests/ref/acodec/pcm-u8 | 6 +--
tests/ref/acodec/roqaudio | 2 +-
tests/ref/fate/mapchan-6ch-extract-2 | 4 +-
tests/ref/fate/mapchan-6ch-extract-2-downmix-mono | 2 +-
tests/ref/fate/mapchan-silent-mono | 2 +-
tests/ref/lavf/w64 | 4 +-
tests/ref/lavf/wav | 4 +-
tests/ref/seek/acodec-pcm-s16le | 54 +++++++++++------------
tests/ref/seek/acodec-pcm-u8 | 54 +++++++++++------------
tests/ref/seek/lavf-wav | 30 ++++++-------
54 files changed, 148 insertions(+), 131 deletions(-)
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 8add6e0..23d83b7 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -527,7 +527,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
/* WAVEFORMATEX header */
- int wavsize = ff_put_wav_header(pb, enc);
+ int wavsize = ff_put_wav_header(pb, enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
if (wavsize < 0)
return -1;
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 7d5aee0..89e2a53 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -325,7 +325,7 @@ static int avi_write_header(AVFormatContext *s)
av_get_pix_fmt_name(stream->pix_fmt));
break;
case AVMEDIA_TYPE_AUDIO:
- if ((ret = ff_put_wav_header(pb, stream)) < 0)
+ if ((ret = ff_put_wav_header(pb, stream, 0)) < 0)
return ret;
break;
default:
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a628c7a..62e2d57 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -593,7 +593,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
if (!codec->codec_tag)
codec->codec_tag = tag;
- ff_put_wav_header(dyn_cp, codec);
+ ff_put_wav_header(dyn_cp, codec, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
}
codecpriv_size = avio_close_dyn_buf(dyn_cp, &codecpriv);
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 22b4ca6..bb0cb55 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -401,7 +401,7 @@ static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track)
avio_wb32(pb, 0);
avio_wl32(pb, track->tag); // store it byteswapped
track->enc->codec_tag = av_bswap16(track->tag >> 16);
- ff_put_wav_header(pb, track->enc);
+ ff_put_wav_header(pb, track->enc, 0);
return update_size(pb, pos);
}
@@ -410,7 +410,7 @@ static int mov_write_wfex_tag(AVIOContext *pb, MOVTrack *track)
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0);
ffio_wfourcc(pb, "wfex");
- ff_put_wav_header(pb, track->enc);
+ ff_put_wav_header(pb, track->enc, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
return update_size(pb, pos);
}
diff --git a/libavformat/riff.h b/libavformat/riff.h
index dba3803..6f07179 100644
--- a/libavformat/riff.h
+++ b/libavformat/riff.h
@@ -46,7 +46,21 @@ void ff_end_tag(AVIOContext *pb, int64_t start);
int ff_get_bmp_header(AVIOContext *pb, AVStream *st, unsigned *esize);
void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf, int ignore_extradata);
-int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc);
+
+/**
+ * Tell ff_put_wav_header() to use WAVEFORMATEX even for PCM codecs.
+ */
+#define FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX 0x00000001
+
+/**
+ * Write WAVEFORMAT header structure.
+ *
+ * @param flags a combination of FF_PUT_WAV_HEADER_* constants
+ *
+ * @return the size or -1 on error
+ */
+int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc, int flags);
+
enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps);
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size);
diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
index 6c91cb6..8701358 100644
--- a/libavformat/riffenc.c
+++ b/libavformat/riffenc.c
@@ -51,7 +51,7 @@ void ff_end_tag(AVIOContext *pb, int64_t start)
/* WAVEFORMATEX header */
/* returns the size or -1 on error */
-int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
+int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc, int flags)
{
int bps, blkalign, bytespersec, frame_size;
int hdrsize;
@@ -189,9 +189,12 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
avio_wl32(pb, 0xAA000080);
avio_wl32(pb, 0x719B3800);
}
- } else {
+ } else if ((flags & FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX) ||
+ enc->codec_tag != 0x0001 /* PCM */ ||
+ riff_extradata - riff_extradata_start) {
+ /* WAVEFORMATEX */
avio_wl16(pb, riff_extradata - riff_extradata_start); /* cbSize */
- }
+ } /* else PCMWAVEFORMAT */
avio_write(pb, riff_extradata_start, riff_extradata - riff_extradata_start);
hdrsize = avio_tell(pb) - hdrstart;
if (hdrsize & 1) {
diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
index 0067dfe..0ddd218 100644
--- a/libavformat/wavenc.c
+++ b/libavformat/wavenc.c
@@ -141,7 +141,7 @@ static int wav_write_header(AVFormatContext *s)
/* format header */
fmt = ff_start_tag(pb, "fmt ");
- if (ff_put_wav_header(pb, s->streams[0]->codec) < 0) {
+ if (ff_put_wav_header(pb, s->streams[0]->codec, 0) < 0) {
av_log(s, AV_LOG_ERROR, "%s codec not supported in WAVE format\n",
s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
return -1;
@@ -323,7 +323,7 @@ static int w64_write_header(AVFormatContext *s)
avio_wl64(pb, -1);
avio_write(pb, ff_w64_guid_wave, sizeof(ff_w64_guid_wave));
start_guid(pb, ff_w64_guid_fmt, &start);
- if ((ret = ff_put_wav_header(pb, s->streams[0]->codec)) < 0) {
+ if ((ret = ff_put_wav_header(pb, s->streams[0]->codec, 0)) < 0) {
av_log(s, AV_LOG_ERROR, "%s codec not supported\n",
s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
return ret;
diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index f051c66..634545d 100644
--- a/libavformat/wtvenc.c
+++ b/libavformat/wtvenc.c
@@ -289,7 +289,7 @@ static int write_stream_codec_info(AVFormatContext *s, AVStream *st)
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
put_videoinfoheader2(pb, st);
} else {
- if (ff_put_wav_header(pb, st->codec) < 0)
+ if (ff_put_wav_header(pb, st->codec, 0) < 0)
format_type = &ff_format_none;
}
hdr_size = avio_tell(pb) - hdr_pos_start;
diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
index b2452fc..ef51216 100644
--- a/tests/fate/filter-audio.mak
+++ b/tests/fate/filter-audio.mak
@@ -66,7 +66,7 @@ fate-filter-channelmap-one-str: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.w
fate-filter-channelmap-one-str: tests/data/asynth-44100-2.wav
fate-filter-channelmap-one-str: CMD = md5 -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/channelmap_one_str -f wav -flags +bitexact
fate-filter-channelmap-one-str: CMP = oneline
-fate-filter-channelmap-one-str: REF = 9fe9bc452282dfd94fd80e9491607a0c
+fate-filter-channelmap-one-str: REF = 49ed4aaec717f1b28137c9e1f01f343b
FATE_AFILTER-$(call FILTERDEMDECENCMUX, CHANNELMAP, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_FILTER_CHANNELMAP)
diff --git a/tests/ref/acodec/adpcm-adx b/tests/ref/acodec/adpcm-adx
index 2bc49ab..b96d99a 100644
--- a/tests/ref/acodec/adpcm-adx
+++ b/tests/ref/acodec/adpcm-adx
@@ -1,4 +1,4 @@
0a30509d9296b857e134b762b76dbc31 *tests/data/fate/acodec-adpcm-adx.adx
297720 tests/data/fate/acodec-adpcm-adx.adx
-2dbc601ed5259f4d74dc48ccd8da7eaf *tests/data/fate/acodec-adpcm-adx.out.wav
+7260139001fcac62384dad50a1023e75 *tests/data/fate/acodec-adpcm-adx.out.wav
stddev: 6989.46 PSNR: 19.44 MAXDIFF:65398 bytes: 1058400/ 1058432
diff --git a/tests/ref/acodec/adpcm-ima_qt b/tests/ref/acodec/adpcm-ima_qt
index ace5325..364dfa1 100644
--- a/tests/ref/acodec/adpcm-ima_qt
+++ b/tests/ref/acodec/adpcm-ima_qt
@@ -1,4 +1,4 @@
44691f14cf5bbef5005df27c692b93ab *tests/data/fate/acodec-adpcm-ima_qt.aiff
281252 tests/data/fate/acodec-adpcm-ima_qt.aiff
-b0fafd002c38fb70acaddfda1a31ed61 *tests/data/fate/acodec-adpcm-ima_qt.out.wav
+7d2f26ea48731b2399718de0f6c39f0c *tests/data/fate/acodec-adpcm-ima_qt.out.wav
stddev: 904.76 PSNR: 37.20 MAXDIFF:34029 bytes: 1058400/ 1058560
diff --git a/tests/ref/acodec/adpcm-ima_wav b/tests/ref/acodec/adpcm-ima_wav
index 6d83fd5..bd3306d 100644
--- a/tests/ref/acodec/adpcm-ima_wav
+++ b/tests/ref/acodec/adpcm-ima_wav
@@ -1,4 +1,4 @@
56b75c3a6dacedcf2ce7b0586aa33594 *tests/data/fate/acodec-adpcm-ima_wav.wav
267324 tests/data/fate/acodec-adpcm-ima_wav.wav
-ddddfa47302da540abf19224202bef57 *tests/data/fate/acodec-adpcm-ima_wav.out.wav
+78a2af1c895792d0c221d127bdd48ece *tests/data/fate/acodec-adpcm-ima_wav.out.wav
stddev: 903.51 PSNR: 37.21 MAXDIFF:34026 bytes: 1058400/ 1061748
diff --git a/tests/ref/acodec/adpcm-ms b/tests/ref/acodec/adpcm-ms
index eb8515d..c760b78 100644
--- a/tests/ref/acodec/adpcm-ms
+++ b/tests/ref/acodec/adpcm-ms
@@ -1,4 +1,4 @@
a407b87daeef5b25dfb6c5b3f519e9c1 *tests/data/fate/acodec-adpcm-ms.wav
268378 tests/data/fate/acodec-adpcm-ms.wav
-22863fb278c4e0ebe9c34cb15db5dd6b *tests/data/fate/acodec-adpcm-ms.out.wav
+7be370f937c51e8a967e6a3d08d5156a *tests/data/fate/acodec-adpcm-ms.out.wav
stddev: 1050.01 PSNR: 35.91 MAXDIFF:29806 bytes: 1058400/ 1060576
diff --git a/tests/ref/acodec/adpcm-swf b/tests/ref/acodec/adpcm-swf
index fddb771..2cb9e90 100644
--- a/tests/ref/acodec/adpcm-swf
+++ b/tests/ref/acodec/adpcm-swf
@@ -1,4 +1,4 @@
42d4639866ed4d692eaf126228a4fa2a *tests/data/fate/acodec-adpcm-swf.flv
269166 tests/data/fate/acodec-adpcm-swf.flv
-f7df69d3fe708303820f2a9d00140a5b *tests/data/fate/acodec-adpcm-swf.out.wav
+628089745a7059ae4055c2515b6d668b *tests/data/fate/acodec-adpcm-swf.out.wav
stddev: 933.58 PSNR: 36.93 MAXDIFF:51119 bytes: 1058400/ 1064960
diff --git a/tests/ref/acodec/adpcm-yamaha b/tests/ref/acodec/adpcm-yamaha
index da60f44..2741058 100644
--- a/tests/ref/acodec/adpcm-yamaha
+++ b/tests/ref/acodec/adpcm-yamaha
@@ -1,4 +1,4 @@
e9c14f701d25947317db9367b9dc772d *tests/data/fate/acodec-adpcm-yamaha.wav
265274 tests/data/fate/acodec-adpcm-yamaha.wav
-1488b5974fa040a65f0d407fc0224c6a *tests/data/fate/acodec-adpcm-yamaha.out.wav
+93b95a663ec8799e0c4db18467b21234 *tests/data/fate/acodec-adpcm-yamaha.out.wav
stddev: 1247.60 PSNR: 34.41 MAXDIFF:39895 bytes: 1058400/ 1060864
diff --git a/tests/ref/acodec/alac b/tests/ref/acodec/alac
index 2739b01..7d6ebe8 100644
--- a/tests/ref/acodec/alac
+++ b/tests/ref/acodec/alac
@@ -1,4 +1,4 @@
8d9fb9f5433962e7880b666e6e2e428e *tests/data/fate/acodec-alac.mov
389018 tests/data/fate/acodec-alac.mov
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-alac.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-alac.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/flac b/tests/ref/acodec/flac
index 1cc3770..c2e7f20 100644
--- a/tests/ref/acodec/flac
+++ b/tests/ref/acodec/flac
@@ -1,4 +1,4 @@
151eef9097f944726968bec48649f00a *tests/data/fate/acodec-flac.flac
361582 tests/data/fate/acodec-flac.flac
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-flac.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-flac.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/g723_1 b/tests/ref/acodec/g723_1
index 9f88a76..e33fe3d 100644
--- a/tests/ref/acodec/g723_1
+++ b/tests/ref/acodec/g723_1
@@ -1,4 +1,4 @@
dec0deb2425e908d232d2471acff04a3 *tests/data/fate/acodec-g723_1.g723_1
4800 tests/data/fate/acodec-g723_1.g723_1
-d70776846d77c652bceed281fcca9cc8 *tests/data/fate/acodec-g723_1.out.wav
+c3b9055d1830969c10d08762fae0b787 *tests/data/fate/acodec-g723_1.out.wav
stddev: 8423.47 PSNR: 17.82 MAXDIFF:53292 bytes: 95992/ 96000
diff --git a/tests/ref/acodec/mp2 b/tests/ref/acodec/mp2
index 42381b4..57b83ac 100644
--- a/tests/ref/acodec/mp2
+++ b/tests/ref/acodec/mp2
@@ -1,4 +1,4 @@
f6eb0a205350bbd7fb1028a01c7ae8aa *tests/data/fate/acodec-mp2.mp2
96130 tests/data/fate/acodec-mp2.mp2
-5a669ca7321adc6ab66a3eade4035909 *tests/data/fate/acodec-mp2.out.wav
+74c7b6b15a001add199619fafe4059a1 *tests/data/fate/acodec-mp2.out.wav
stddev: 4384.33 PSNR: 23.49 MAXDIFF:52631 bytes: 1058400/ 1057916
diff --git a/tests/ref/acodec/mp2fixed b/tests/ref/acodec/mp2fixed
index 3a41d1c..bf8cc7f 100644
--- a/tests/ref/acodec/mp2fixed
+++ b/tests/ref/acodec/mp2fixed
@@ -1,4 +1,4 @@
05445de0f0305df85db4ed0ce94e5f4c *tests/data/fate/acodec-mp2fixed.mp2
288391 tests/data/fate/acodec-mp2fixed.mp2
-82f117c9345aa028bfb6cf5794432043 *tests/data/fate/acodec-mp2fixed.out.wav
+b1b4a13e42db11e9fb1bd2c93692d548 *tests/data/fate/acodec-mp2fixed.out.wav
stddev: 3653.84 PSNR: 25.07 MAXDIFF:39970 bytes: 1058400/ 1057916
diff --git a/tests/ref/acodec/pcm-alaw b/tests/ref/acodec/pcm-alaw
index 28ce960..00555e3 100644
--- a/tests/ref/acodec/pcm-alaw
+++ b/tests/ref/acodec/pcm-alaw
@@ -1,4 +1,4 @@
a2dd6a934ec6d5ec901a211652e85227 *tests/data/fate/acodec-pcm-alaw.wav
529258 tests/data/fate/acodec-pcm-alaw.wav
-f323f7551ffad91de8613f44dcb198b6 *tests/data/fate/acodec-pcm-alaw.out.wav
+0568b0b9a72e31559e150e7e09d301cd *tests/data/fate/acodec-pcm-alaw.out.wav
stddev: 101.67 PSNR: 56.19 MAXDIFF: 515 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-f32be b/tests/ref/acodec/pcm-f32be
index 5bd700c..b98c0b7 100644
--- a/tests/ref/acodec/pcm-f32be
+++ b/tests/ref/acodec/pcm-f32be
@@ -1,4 +1,4 @@
e74eb6b65cb397ce541bac120b00680a *tests/data/fate/acodec-pcm-f32be.au
2116832 tests/data/fate/acodec-pcm-f32be.au
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-f32be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-f32be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-f32le b/tests/ref/acodec/pcm-f32le
index 681f083..c0fdd70 100644
--- a/tests/ref/acodec/pcm-f32le
+++ b/tests/ref/acodec/pcm-f32le
@@ -1,4 +1,4 @@
653d82a64b7bd96ac193e105e9f92d4c *tests/data/fate/acodec-pcm-f32le.wav
2116880 tests/data/fate/acodec-pcm-f32le.wav
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-f32le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-f32le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-f64be b/tests/ref/acodec/pcm-f64be
index fd0cff6..e0e0307 100644
--- a/tests/ref/acodec/pcm-f64be
+++ b/tests/ref/acodec/pcm-f64be
@@ -1,4 +1,4 @@
8c8ba9d2c68384c5f077306e220f1188 *tests/data/fate/acodec-pcm-f64be.au
4233632 tests/data/fate/acodec-pcm-f64be.au
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-f64be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-f64be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-f64le b/tests/ref/acodec/pcm-f64le
index c6cb027..5c90e7b 100644
--- a/tests/ref/acodec/pcm-f64le
+++ b/tests/ref/acodec/pcm-f64le
@@ -1,4 +1,4 @@
48b4cd378f47a50dc902aa03cc8280ed *tests/data/fate/acodec-pcm-f64le.wav
4233680 tests/data/fate/acodec-pcm-f64le.wav
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-f64le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-f64le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-mulaw b/tests/ref/acodec/pcm-mulaw
index bd2a1e8..f5c117d 100644
--- a/tests/ref/acodec/pcm-mulaw
+++ b/tests/ref/acodec/pcm-mulaw
@@ -1,4 +1,4 @@
fd10ee54bd298fc29fd6fc70baa71414 *tests/data/fate/acodec-pcm-mulaw.wav
529258 tests/data/fate/acodec-pcm-mulaw.wav
-7ae8c3fc804bd574006fd547fe28980c *tests/data/fate/acodec-pcm-mulaw.out.wav
+1c3eeaa8814ebd4916780dff80ed6dc5 *tests/data/fate/acodec-pcm-mulaw.out.wav
stddev: 103.38 PSNR: 56.04 MAXDIFF: 644 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s16be b/tests/ref/acodec/pcm-s16be
index de7c5c7..a9b4593 100644
--- a/tests/ref/acodec/pcm-s16be
+++ b/tests/ref/acodec/pcm-s16be
@@ -1,4 +1,4 @@
d2515f35266ae6dba525c700bb76d893 *tests/data/fate/acodec-pcm-s16be.mov
1059069 tests/data/fate/acodec-pcm-s16be.mov
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s16be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s16be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s16be_planar b/tests/ref/acodec/pcm-s16be_planar
index 8116480..8776cab 100644
--- a/tests/ref/acodec/pcm-s16be_planar
+++ b/tests/ref/acodec/pcm-s16be_planar
@@ -1,4 +1,4 @@
cd87e6fc3bddb85c945c050d8c3fba11 *tests/data/fate/acodec-pcm-s16be_planar.nut
1060673 tests/data/fate/acodec-pcm-s16be_planar.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s16be_planar.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s16be_planar.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s16le b/tests/ref/acodec/pcm-s16le
index 51366ad..5fa80bd 100644
--- a/tests/ref/acodec/pcm-s16le
+++ b/tests/ref/acodec/pcm-s16le
@@ -1,4 +1,4 @@
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s16le.wav
-1058446 tests/data/fate/acodec-pcm-s16le.wav
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s16le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s16le.wav
+1058444 tests/data/fate/acodec-pcm-s16le.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s16le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s16le_planar b/tests/ref/acodec/pcm-s16le_planar
index c933001..8933e90 100644
--- a/tests/ref/acodec/pcm-s16le_planar
+++ b/tests/ref/acodec/pcm-s16le_planar
@@ -1,4 +1,4 @@
74af9a0ae4f68451102a2f7524b2d55f *tests/data/fate/acodec-pcm-s16le_planar.nut
1060673 tests/data/fate/acodec-pcm-s16le_planar.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s16le_planar.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s16le_planar.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s24be b/tests/ref/acodec/pcm-s24be
index 70271d2..916aceb 100644
--- a/tests/ref/acodec/pcm-s24be
+++ b/tests/ref/acodec/pcm-s24be
@@ -1,4 +1,4 @@
0f4a37a77619124f486f656f03c53d33 *tests/data/fate/acodec-pcm-s24be.mov
1588323 tests/data/fate/acodec-pcm-s24be.mov
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s24be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s24be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s24le b/tests/ref/acodec/pcm-s24le
index a7e77e2..cf5ae1a 100644
--- a/tests/ref/acodec/pcm-s24le
+++ b/tests/ref/acodec/pcm-s24le
@@ -1,4 +1,4 @@
18ea73985dbdf59e23f5aba66145e6fe *tests/data/fate/acodec-pcm-s24le.wav
1587668 tests/data/fate/acodec-pcm-s24le.wav
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s24le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s24le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s24le_planar b/tests/ref/acodec/pcm-s24le_planar
index 14d4cec..1a98229 100644
--- a/tests/ref/acodec/pcm-s24le_planar
+++ b/tests/ref/acodec/pcm-s24le_planar
@@ -1,4 +1,4 @@
83e315ce8083a6d035f801bb862942bf *tests/data/fate/acodec-pcm-s24le_planar.nut
1590202 tests/data/fate/acodec-pcm-s24le_planar.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s24le_planar.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s24le_planar.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s32be b/tests/ref/acodec/pcm-s32be
index 03f14c1..5a48bb2 100644
--- a/tests/ref/acodec/pcm-s32be
+++ b/tests/ref/acodec/pcm-s32be
@@ -1,4 +1,4 @@
d6380bf54ac3e452c190ce302c264bf0 *tests/data/fate/acodec-pcm-s32be.mov
2117527 tests/data/fate/acodec-pcm-s32be.mov
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s32be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s32be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s32le b/tests/ref/acodec/pcm-s32le
index 1c3e412..47c736b 100644
--- a/tests/ref/acodec/pcm-s32le
+++ b/tests/ref/acodec/pcm-s32le
@@ -1,4 +1,4 @@
8d8849fa5c5d91b9cb74f5c74e937faf *tests/data/fate/acodec-pcm-s32le.wav
2116868 tests/data/fate/acodec-pcm-s32le.wav
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s32le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s32le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s32le_planar b/tests/ref/acodec/pcm-s32le_planar
index 7648766..115fe9d 100644
--- a/tests/ref/acodec/pcm-s32le_planar
+++ b/tests/ref/acodec/pcm-s32le_planar
@@ -1,4 +1,4 @@
f6199b2c698bd5dd1438b53431357bec *tests/data/fate/acodec-pcm-s32le_planar.nut
2120148 tests/data/fate/acodec-pcm-s32le_planar.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-s32le_planar.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-s32le_planar.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s8 b/tests/ref/acodec/pcm-s8
index a5a459a..14f4c85 100644
--- a/tests/ref/acodec/pcm-s8
+++ b/tests/ref/acodec/pcm-s8
@@ -1,4 +1,4 @@
00a9d90e06e8ecb79e5dd4c6c8460836 *tests/data/fate/acodec-pcm-s8.mov
529853 tests/data/fate/acodec-pcm-s8.mov
-651d4eb8d98dfcdda96ae6c43d8f156b *tests/data/fate/acodec-pcm-s8.out.wav
+652edf30f35ad89bf27bcc9d2f9c7b53 *tests/data/fate/acodec-pcm-s8.out.wav
stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-s8_planar b/tests/ref/acodec/pcm-s8_planar
index 6ab6ee0..f6566d8 100644
--- a/tests/ref/acodec/pcm-s8_planar
+++ b/tests/ref/acodec/pcm-s8_planar
@@ -1,4 +1,4 @@
ce99d95295ade9945849ef7c1de8c4ca *tests/data/fate/acodec-pcm-s8_planar.nut
531054 tests/data/fate/acodec-pcm-s8_planar.nut
-651d4eb8d98dfcdda96ae6c43d8f156b *tests/data/fate/acodec-pcm-s8_planar.out.wav
+652edf30f35ad89bf27bcc9d2f9c7b53 *tests/data/fate/acodec-pcm-s8_planar.out.wav
stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-u16be b/tests/ref/acodec/pcm-u16be
index 0214975..4e758d7 100644
--- a/tests/ref/acodec/pcm-u16be
+++ b/tests/ref/acodec/pcm-u16be
@@ -1,4 +1,4 @@
eab6206a2cec3c5a3be47fdaa826faff *tests/data/fate/acodec-pcm-u16be.nut
1060673 tests/data/fate/acodec-pcm-u16be.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-u16be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-u16be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-u16le b/tests/ref/acodec/pcm-u16le
index e45fe08..f40e4bb 100644
--- a/tests/ref/acodec/pcm-u16le
+++ b/tests/ref/acodec/pcm-u16le
@@ -1,4 +1,4 @@
8fceb284cc6a5a114b6ce7a10fd08020 *tests/data/fate/acodec-pcm-u16le.nut
1060673 tests/data/fate/acodec-pcm-u16le.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-u16le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-u16le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-u24be b/tests/ref/acodec/pcm-u24be
index ddab6e8..daa8798 100644
--- a/tests/ref/acodec/pcm-u24be
+++ b/tests/ref/acodec/pcm-u24be
@@ -1,4 +1,4 @@
d1a55f46c88ed1efa77d05b60259675d *tests/data/fate/acodec-pcm-u24be.nut
1590202 tests/data/fate/acodec-pcm-u24be.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-u24be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-u24be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-u24le b/tests/ref/acodec/pcm-u24le
index df06ca4..5e2e906 100644
--- a/tests/ref/acodec/pcm-u24le
+++ b/tests/ref/acodec/pcm-u24le
@@ -1,4 +1,4 @@
6d7df9b7e074548cf18dd16365862f1b *tests/data/fate/acodec-pcm-u24le.nut
1590202 tests/data/fate/acodec-pcm-u24le.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-u24le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-u24le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-u32be b/tests/ref/acodec/pcm-u32be
index 6a53919..f109d5d 100644
--- a/tests/ref/acodec/pcm-u32be
+++ b/tests/ref/acodec/pcm-u32be
@@ -1,4 +1,4 @@
7078e6d7e80247b8531d5cc16d09f385 *tests/data/fate/acodec-pcm-u32be.nut
2120148 tests/data/fate/acodec-pcm-u32be.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-u32be.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-u32be.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-u32le b/tests/ref/acodec/pcm-u32le
index 18a5d15..909a4ed 100644
--- a/tests/ref/acodec/pcm-u32le
+++ b/tests/ref/acodec/pcm-u32le
@@ -1,4 +1,4 @@
34df9a7e1fe60da0bc6ec0485b68726e *tests/data/fate/acodec-pcm-u32le.nut
2120148 tests/data/fate/acodec-pcm-u32le.nut
-64151e4bcc2b717aa5a8454d424d6a1f *tests/data/fate/acodec-pcm-u32le.out.wav
+95e54b261530a1bcf6de6fe3b21dc5f6 *tests/data/fate/acodec-pcm-u32le.out.wav
stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/pcm-u8 b/tests/ref/acodec/pcm-u8
index 80e70ea..c9bf04a 100644
--- a/tests/ref/acodec/pcm-u8
+++ b/tests/ref/acodec/pcm-u8
@@ -1,4 +1,4 @@
-70fecbae732f81143a560c7315eda49a *tests/data/fate/acodec-pcm-u8.wav
-529246 tests/data/fate/acodec-pcm-u8.wav
-651d4eb8d98dfcdda96ae6c43d8f156b *tests/data/fate/acodec-pcm-u8.out.wav
+98cadb3502dbdc99e6e077c28b1a036c *tests/data/fate/acodec-pcm-u8.wav
+529244 tests/data/fate/acodec-pcm-u8.wav
+652edf30f35ad89bf27bcc9d2f9c7b53 *tests/data/fate/acodec-pcm-u8.out.wav
stddev: 147.89 PSNR: 52.93 MAXDIFF: 255 bytes: 1058400/ 1058400
diff --git a/tests/ref/acodec/roqaudio b/tests/ref/acodec/roqaudio
index 8632504..61cb27a 100644
--- a/tests/ref/acodec/roqaudio
+++ b/tests/ref/acodec/roqaudio
@@ -1,4 +1,4 @@
75859976d7098588aeaebbc5551484a9 *tests/data/fate/acodec-roqaudio.roq
265992 tests/data/fate/acodec-roqaudio.roq
-be6d954adaf984f2dc65a3ff50b55f26 *tests/data/fate/acodec-roqaudio.out.wav
+73d5aaaab9488e63f1cf6fc324c7a9a2 *tests/data/fate/acodec-roqaudio.out.wav
stddev: 4481.70 PSNR: 23.30 MAXDIFF:46250 bytes: 1058400/ 1058400
diff --git a/tests/ref/fate/mapchan-6ch-extract-2 b/tests/ref/fate/mapchan-6ch-extract-2
index 98c8540..ba08c86 100644
--- a/tests/ref/fate/mapchan-6ch-extract-2
+++ b/tests/ref/fate/mapchan-6ch-extract-2
@@ -1,2 +1,2 @@
-6f091fe8c0be88c75921731dc9f74314
-5c2d162b9024329eb367295d37b8ca0a
+3be6f8cefbf3c2e6dce670ee190b4313
+b8791d1c07de59dd1badf2c7b5f62a74
diff --git a/tests/ref/fate/mapchan-6ch-extract-2-downmix-mono b/tests/ref/fate/mapchan-6ch-extract-2-downmix-mono
index f42de0c..618b9d9 100644
--- a/tests/ref/fate/mapchan-6ch-extract-2-downmix-mono
+++ b/tests/ref/fate/mapchan-6ch-extract-2-downmix-mono
@@ -1 +1 @@
-959645ed73e6d08d8f1e947eac5d0b92
+e02d9537df5f534d14937bf7ab9b9a40
diff --git a/tests/ref/fate/mapchan-silent-mono b/tests/ref/fate/mapchan-silent-mono
index a867e3b..7d77801 100644
--- a/tests/ref/fate/mapchan-silent-mono
+++ b/tests/ref/fate/mapchan-silent-mono
@@ -1 +1 @@
-4f5148f08587a4b9794aa52aec7852ac
+c37237a92bcf708bc0e20b713665a5a7
diff --git a/tests/ref/lavf/w64 b/tests/ref/lavf/w64
index 7da4f09..26c6868 100644
--- a/tests/ref/lavf/w64
+++ b/tests/ref/lavf/w64
@@ -1,3 +1,3 @@
-062b91c34d570a90af8d55427804878e *./tests/data/lavf/lavf.w64
-88312 ./tests/data/lavf/lavf.w64
+82c75c9cb61924fda68d9602ea69c445 *./tests/data/lavf/lavf.w64
+88304 ./tests/data/lavf/lavf.w64
./tests/data/lavf/lavf.w64 CRC=0x3a1da17e
diff --git a/tests/ref/lavf/wav b/tests/ref/lavf/wav
index 600c26a..da3bfc2 100644
--- a/tests/ref/lavf/wav
+++ b/tests/ref/lavf/wav
@@ -1,3 +1,3 @@
-eb5a869456d2e9107bb195c8c99be1a1 *./tests/data/lavf/lavf.wav
-88276 ./tests/data/lavf/lavf.wav
+fc958a32b4fca7b1c40cbdaef2d1416e *./tests/data/lavf/lavf.wav
+88274 ./tests/data/lavf/lavf.wav
./tests/data/lavf/lavf.wav CRC=0x3a1da17e
diff --git a/tests/ref/seek/acodec-pcm-s16le b/tests/ref/seek/acodec-pcm-s16le
index 4f1ffc5..41acc98 100644
--- a/tests/ref/seek/acodec-pcm-s16le
+++ b/tests/ref/seek/acodec-pcm-s16le
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 334178 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 334176 size: 4096
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 139110 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 139108 size: 4096
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 454570 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 454568 size: 4096
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 259502 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 259500 size: 4096
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 64434 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 64432 size: 4096
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 379894 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 379892 size: 4096
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 184826 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 184824 size: 4096
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 500286 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 500284 size: 4096
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 305218 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 305216 size: 4096
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 110150 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 110148 size: 4096
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.412494
-ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 425610 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 425608 size: 4096
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 230542 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 230540 size: 4096
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 35474 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 35472 size: 4096
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 1.989184
-ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 350938 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 350936 size: 4096
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 155866 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 155864 size: 4096
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:0 ts: 2.671678
-ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 471330 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 471328 size: 4096
ret: 0 st: 0 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 276262 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 276260 size: 4096
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 81190 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 81188 size: 4096
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
diff --git a/tests/ref/seek/acodec-pcm-u8 b/tests/ref/seek/acodec-pcm-u8
index 8348916..afa3351 100644
--- a/tests/ref/seek/acodec-pcm-u8
+++ b/tests/ref/seek/acodec-pcm-u8
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 167112 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.894172 pts: 1.894172 pos: 167110 size: 4096
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69578 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69576 size: 4096
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.576668
-ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 227308 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.576667 pts: 2.576667 pos: 227306 size: 4096
ret: 0 st:-1 flags:1 ts: 1.470835
-ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 129774 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.470839 pts: 1.470839 pos: 129772 size: 4096
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32240 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32238 size: 4096
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st:-1 flags:0 ts: 2.153336
-ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 189970 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.153333 pts: 2.153333 pos: 189968 size: 4096
ret: 0 st:-1 flags:1 ts: 1.047503
-ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 92436 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.047506 pts: 1.047506 pos: 92434 size: 4096
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.835828
-ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 250166 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.835828 pts: 2.835828 pos: 250164 size: 4096
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 152632 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.730000 pts: 1.730000 pos: 152630 size: 4096
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55098 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55096 size: 4096
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 2.412494
-ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 212828 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.412494 pts: 2.412494 pos: 212826 size: 4096
ret: 0 st:-1 flags:0 ts: 1.306672
-ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 115294 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.306667 pts: 1.306667 pos: 115292 size: 4096
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17760 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17758 size: 4096
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:1 ts: 1.989184
-ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 175492 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.989184 pts: 1.989184 pos: 175490 size: 4096
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77956 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77954 size: 4096
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
ret: 0 st: 0 flags:0 ts: 2.671678
-ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 235688 size: 4096
+ret: 0 st: 0 flags:1 dts: 2.671678 pts: 2.671678 pos: 235686 size: 4096
ret: 0 st: 0 flags:1 ts: 1.565850
-ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 138154 size: 4096
+ret: 0 st: 0 flags:1 dts: 1.565850 pts: 1.565850 pos: 138152 size: 4096
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40618 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40616 size: 4096
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 46 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 44 size: 4096
diff --git a/tests/ref/seek/lavf-wav b/tests/ref/seek/lavf-wav
index 16a33be..ed2f8d6 100644
--- a/tests/ref/seek/lavf-wav
+++ b/tests/ref/seek/lavf-wav
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:1 ts: 1.894167
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.788345
-ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69608 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos: 69606 size: 4096
ret: 0 st: 0 flags:1 ts:-0.317506
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:0 ts: 2.576668
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.470835
ret:-EOF
ret: 0 st: 0 flags:0 ts: 0.365011
-ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32270 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.365011 pts: 0.365011 pos: 32268 size: 4096
ret: 0 st: 0 flags:1 ts:-0.740839
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st:-1 flags:0 ts: 2.153336
ret:-EOF
ret: 0 st:-1 flags:1 ts: 1.047503
ret:-EOF
ret: 0 st: 0 flags:0 ts:-0.058322
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:1 ts: 2.835828
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.730004
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55128 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.624172 pts: 0.624172 pos: 55126 size: 4096
ret: 0 st: 0 flags:0 ts:-0.481655
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:1 ts: 2.412494
ret:-EOF
ret: 0 st:-1 flags:0 ts: 1.306672
ret:-EOF
ret: 0 st:-1 flags:1 ts: 0.200839
-ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17790 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.200839 pts: 0.200839 pos: 17788 size: 4096
ret: 0 st: 0 flags:0 ts:-0.904989
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:1 ts: 1.989184
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77986 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.883333 pts: 0.883333 pos: 77984 size: 4096
ret: 0 st:-1 flags:1 ts:-0.222493
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
ret: 0 st: 0 flags:0 ts: 2.671678
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.565850
ret:-EOF
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40648 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.460000 pts: 0.460000 pos: 40646 size: 4096
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 76 size: 4096
+ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 74 size: 4096
--
1.9.2
More information about the ffmpeg-devel
mailing list