[FFmpeg-cvslog] mpegaudioenc: use AVCodec.encode2()
Justin Ruggles
git at videolan.org
Thu Mar 22 01:33:57 CET 2012
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Sun Feb 19 17:12:48 2012 -0500| [b0f75ba272feb465d21cb4520574b8db76c1e954] | committer: Justin Ruggles
mpegaudioenc: use AVCodec.encode2()
Update FATE references due to encoder delay.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0f75ba272feb465d21cb4520574b8db76c1e954
---
libavcodec/mpegaudioenc.c | 29 ++++++++++++++++-----
tests/ref/lavf/asf | 4 +-
tests/ref/lavf/ffm | 4 +-
tests/ref/lavf/mkv | 4 +-
tests/ref/lavf/mpg | 4 +-
tests/ref/lavf/ts | 4 +-
tests/ref/seek/lavf_asf | 60 ++++++++++++++++++++++++--------------------
tests/ref/seek/lavf_ffm | 36 +++++++++++++-------------
tests/ref/seek/lavf_mkv | 38 ++++++++++++++--------------
tests/ref/seek/lavf_mpg | 42 +++++++++++++++---------------
tests/ref/seek/lavf_ts | 16 ++++++------
11 files changed, 131 insertions(+), 110 deletions(-)
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index 9ee7f2c..385a79a 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -80,6 +80,7 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
bitrate = bitrate / 1000;
s->nb_channels = channels;
avctx->frame_size = MPA_FRAME_SIZE;
+ avctx->delay = 512 - 32 + 1;
/* encoding freq */
s->lsf = 0;
@@ -180,9 +181,11 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
total_quant_bits[i] = 12 * v;
}
+#if FF_API_OLD_ENCODE_AUDIO
avctx->coded_frame= avcodec_alloc_frame();
if (!avctx->coded_frame)
return AVERROR(ENOMEM);
+#endif
return 0;
}
@@ -726,14 +729,14 @@ static void encode_frame(MpegAudioContext *s,
flush_put_bits(p);
}
-static int MPA_encode_frame(AVCodecContext *avctx,
- unsigned char *frame, int buf_size, void *data)
+static int MPA_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
+ const AVFrame *frame, int *got_packet_ptr)
{
MpegAudioContext *s = avctx->priv_data;
- const short *samples = data;
+ const int16_t *samples = (const int16_t *)frame->data[0];
short smr[MPA_MAX_CHANNELS][SBLIMIT];
unsigned char bit_alloc[MPA_MAX_CHANNELS][SBLIMIT];
- int padding, i;
+ int padding, i, ret;
for(i=0;i<s->nb_channels;i++) {
filter(s, i, samples + i, s->nb_channels);
@@ -748,16 +751,28 @@ static int MPA_encode_frame(AVCodecContext *avctx,
}
compute_bit_allocation(s, smr, bit_alloc, &padding);
- init_put_bits(&s->pb, frame, MPA_MAX_CODED_FRAME_SIZE);
+ if ((ret = ff_alloc_packet(avpkt, MPA_MAX_CODED_FRAME_SIZE))) {
+ av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
+ return ret;
+ }
+
+ init_put_bits(&s->pb, avpkt->data, avpkt->size);
encode_frame(s, bit_alloc, padding);
- return put_bits_ptr(&s->pb) - s->pb.buf;
+ if (frame->pts != AV_NOPTS_VALUE)
+ avpkt->pts = frame->pts - ff_samples_to_time_base(avctx, avctx->delay);
+
+ avpkt->size = put_bits_count(&s->pb) / 8;
+ *got_packet_ptr = 1;
+ return 0;
}
static av_cold int MPA_encode_close(AVCodecContext *avctx)
{
+#if FF_API_OLD_ENCODE_AUDIO
av_freep(&avctx->coded_frame);
+#endif
return 0;
}
@@ -772,7 +787,7 @@ AVCodec ff_mp2_encoder = {
.id = CODEC_ID_MP2,
.priv_data_size = sizeof(MpegAudioContext),
.init = MPA_encode_init,
- .encode = MPA_encode_frame,
+ .encode2 = MPA_encode_frame,
.close = MPA_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
.supported_samplerates= (const int[]){44100, 48000, 32000, 22050, 24000, 16000, 0},
diff --git a/tests/ref/lavf/asf b/tests/ref/lavf/asf
index 2d4788a..0137925 100644
--- a/tests/ref/lavf/asf
+++ b/tests/ref/lavf/asf
@@ -1,3 +1,3 @@
-98ffddfa94926558ecf20cc6f47236a6 *./tests/data/lavf/lavf.asf
+528d3cbe33288ad983a8ff5b66738976 *./tests/data/lavf/lavf.asf
333375 ./tests/data/lavf/lavf.asf
-./tests/data/lavf/lavf.asf CRC=0x51485213
+./tests/data/lavf/lavf.asf CRC=0xba1f5213
diff --git a/tests/ref/lavf/ffm b/tests/ref/lavf/ffm
index afef176..b95eb8b 100644
--- a/tests/ref/lavf/ffm
+++ b/tests/ref/lavf/ffm
@@ -1,3 +1,3 @@
-8a95fa3db8e6082ed24e963e40ec1526 *./tests/data/lavf/lavf.ffm
+0063b1b49d8641dcbf354092529a58a4 *./tests/data/lavf/lavf.ffm
376832 ./tests/data/lavf/lavf.ffm
-./tests/data/lavf/lavf.ffm CRC=0x88f58ba1
+./tests/data/lavf/lavf.ffm CRC=0x38388ba1
diff --git a/tests/ref/lavf/mkv b/tests/ref/lavf/mkv
index 8185d15..5ea3638 100644
--- a/tests/ref/lavf/mkv
+++ b/tests/ref/lavf/mkv
@@ -1,3 +1,3 @@
-ed1f083a7d2169c51e5894dabed061df *./tests/data/lavf/lavf.mkv
+2c6fbc2c818c849e77702141294d775d *./tests/data/lavf/lavf.mkv
320262 ./tests/data/lavf/lavf.mkv
-./tests/data/lavf/lavf.mkv CRC=0xa79b84dd
+./tests/data/lavf/lavf.mkv CRC=0xd86284dd
diff --git a/tests/ref/lavf/mpg b/tests/ref/lavf/mpg
index 1b63d75..e76f747 100644
--- a/tests/ref/lavf/mpg
+++ b/tests/ref/lavf/mpg
@@ -1,3 +1,3 @@
-f0b995c0c10b08133f5138069c3e9786 *./tests/data/lavf/lavf.mpg
+af32acbc73ee486b05a37d53e516d5e7 *./tests/data/lavf/lavf.mpg
372736 ./tests/data/lavf/lavf.mpg
-./tests/data/lavf/lavf.mpg CRC=0x88f58ba1
+./tests/data/lavf/lavf.mpg CRC=0x38388ba1
diff --git a/tests/ref/lavf/ts b/tests/ref/lavf/ts
index 9493766..333149e 100644
--- a/tests/ref/lavf/ts
+++ b/tests/ref/lavf/ts
@@ -1,3 +1,3 @@
-9b59f71822c6dde18fb38b084c150285 *./tests/data/lavf/lavf.ts
+ec8df9c78de8f7f20a3eb1ce8f863c02 *./tests/data/lavf/lavf.ts
406456 ./tests/data/lavf/lavf.ts
-./tests/data/lavf/lavf.ts CRC=0x64fab4df
+./tests/data/lavf/lavf.ts CRC=0x0fdeb4df
diff --git a/tests/ref/seek/lavf_asf b/tests/ref/seek/lavf_asf
index 72c0f56..e1d6d32 100644
--- a/tests/ref/seek/lavf_asf
+++ b/tests/ref/seek/lavf_asf
@@ -1,47 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 1 flags:1 dts: 0.444000 pts: 0.444000 pos: 147775 size: 209
+ret: 0 st: 1 flags:1 dts: 0.459000 pts: 0.459000 pos: 147775 size: 209
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
ret: 0 st: 0 flags:1 ts:-0.317000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487
-ret:-1 st: 1 flags:0 ts: 2.577000
-ret:-1 st: 1 flags:1 ts: 1.471000
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
+ret: 0 st: 1 flags:0 ts: 2.577000
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 330175 size: 209
+ret: 0 st: 1 flags:1 ts: 1.471000
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 330175 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 1 flags:1 dts: 0.444000 pts: 0.444000 pos: 147775 size: 209
+ret: 0 st: 1 flags:1 dts: 0.459000 pts: 0.459000 pos: 147775 size: 209
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
ret: 0 st: 0 flags:0 ts: 2.153000
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
ret: 0 st: 0 flags:1 ts: 1.048000
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
ret: 0 st: 1 flags:0 ts:-0.058000
-ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 29375 size: 208
-ret:-1 st: 1 flags:1 ts: 2.836000
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
+ret: 0 st: 1 flags:1 ts: 2.836000
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 330175 size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 1 flags:1 dts: 0.444000 pts: 0.444000 pos: 147775 size: 209
+ret: 0 st: 1 flags:1 dts: 0.459000 pts: 0.459000 pos: 147775 size: 209
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
-ret:-1 st: 1 flags:0 ts: 1.307000
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
+ret: 0 st: 1 flags:0 ts: 1.307000
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 330175 size: 209
ret: 0 st: 1 flags:1 ts: 0.201000
-ret: 0 st: 1 flags:1 dts: 0.183000 pts: 0.183000 pos: 70975 size: 209
+ret: 0 st: 1 flags:1 dts: 0.198000 pts: 0.198000 pos: 74175 size: 209
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
ret: 0 st: 0 flags:0 ts: 0.883000
-ret: 0 st: 1 flags:1 dts: 0.940000 pts: 0.940000 pos: 301375 size: 209
+ret: 0 st: 1 flags:1 dts: 0.930000 pts: 0.930000 pos: 301375 size: 209
ret: 0 st: 0 flags:1 ts:-0.222000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487
-ret:-1 st: 1 flags:0 ts: 2.672000
-ret:-1 st: 1 flags:1 ts: 1.566000
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
+ret: 0 st: 1 flags:0 ts: 2.672000
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 330175 size: 209
+ret: 0 st: 1 flags:1 ts: 1.566000
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 330175 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 1 flags:1 dts: 0.444000 pts: 0.444000 pos: 147775 size: 209
+ret: 0 st: 1 flags:1 dts: 0.459000 pts: 0.459000 pos: 147775 size: 209
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 575 size: 28487
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 575 size: 208
diff --git a/tests/ref/seek/lavf_ffm b/tests/ref/seek/lavf_ffm
index 46cf764..2597220 100644
--- a/tests/ref/seek/lavf_ffm
+++ b/tests/ref/seek/lavf_ffm
@@ -2,52 +2,52 @@ ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 0 flags:0 ts: 0.788334
-ret: 0 st: 1 flags:1 dts: 0.783673 pts: 0.783673 pos: 315392 size: 209
+ret: 0 st: 1 flags:1 dts: 0.772766 pts: 0.772766 pos: 315392 size: 209
ret: 0 st: 0 flags:1 ts:-0.317499
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 1 flags:0 ts: 2.576668
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 1 flags:1 ts: 1.470835
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 1 flags:1 dts: 0.339592 pts: 0.339592 pos: 155648 size: 209
+ret: 0 st: 1 flags:1 dts: 0.328685 pts: 0.328685 pos: 155648 size: 209
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 0 flags:0 ts: 2.153336
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 0 flags:1 ts: 1.047503
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 1 flags:0 ts:-0.058330
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 1 flags:1 ts: 2.835837
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 1 flags:1 dts: 0.653061 pts: 0.653061 pos: 274432 size: 209
+ret: 0 st: 1 flags:1 dts: 0.642154 pts: 0.642154 pos: 274432 size: 209
ret: 0 st: 0 flags:0 ts:-0.481662
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 0 flags:1 ts: 2.412505
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 1 flags:0 ts: 1.306672
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 1 flags:1 ts: 0.200839
-ret: 0 st: 1 flags:1 dts: 0.208980 pts: 0.208980 pos: 114688 size: 209
+ret: 0 st: 1 flags:1 dts: 0.224195 pts: 0.224195 pos: 114688 size: 209
ret: 0 st:-1 flags:0 ts:-0.904994
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 0 flags:0 ts: 0.883340
-ret: 0 st: 0 flags:0 dts: 0.880000 pts: 0.920000 pos: 339968 size: 12307
+ret: 0 st: 1 flags:1 dts: 0.877256 pts: 0.877256 pos: 339968 size: 209
ret: 0 st: 0 flags:1 ts:-0.222493
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
ret: 0 st: 1 flags:0 ts: 2.671674
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st: 1 flags:1 ts: 1.565841
-ret: 0 st: 1 flags:1 dts: 0.940408 pts: 0.940408 pos: 376832 size: 209
+ret: 0 st: 1 flags:1 dts: 0.929501 pts: 0.929501 pos: 376832 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 1 flags:1 dts: 0.444082 pts: 0.444082 pos: 204800 size: 209
+ret: 0 st: 1 flags:1 dts: 0.459297 pts: 0.459297 pos: 204800 size: 209
ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 0 flags:1 dts:-0.040000 pts: 0.000000 pos: 8192 size: 24664
diff --git a/tests/ref/seek/lavf_mkv b/tests/ref/seek/lavf_mkv
index f259021..0f76f34 100644
--- a/tests/ref/seek/lavf_mkv
+++ b/tests/ref/seek/lavf_mkv
@@ -1,53 +1,53 @@
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 512 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 291934 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
ret: 0 st: 0 flags:0 ts: 0.788000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 291934 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 ts:-0.317000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st: 1 flags:0 ts: 2.577000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.471000
-ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 319991 size: 209
ret: 0 st:-1 flags:0 ts: 0.365002
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146703 size: 27925
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st: 0 flags:0 ts: 2.153000
ret:-EOF
ret: 0 st: 0 flags:1 ts: 1.048000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 291934 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
ret: 0 st: 1 flags:0 ts:-0.058000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.015000 pts: 0.015000 pos: 512 size: 208
ret: 0 st: 1 flags:1 ts: 2.836000
-ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 319991 size: 209
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.480000 pts: 0.480000 pos: 146703 size: 27925
ret: 0 st: 0 flags:0 ts:-0.482000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st: 0 flags:1 ts: 2.413000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 291934 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
ret: 0 st: 1 flags:0 ts: 1.307000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 0.201000
-ret: 0 st: 1 flags:1 dts: 0.183000 pts: 0.183000 pos: 72083 size: 209
+ret: 0 st: 1 flags:1 dts: 0.198000 pts: 0.198000 pos: 512 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 291934 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
ret: 0 st: 0 flags:0 ts: 0.883000
-ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 291934 size: 27834
+ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292150 size: 27834
ret: 0 st: 0 flags:1 ts:-0.222000
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
ret: 0 st: 1 flags:0 ts: 2.672000
ret:-EOF
ret: 0 st: 1 flags:1 ts: 1.566000
-ret: 0 st: 1 flags:1 dts: 0.993000 pts: 0.993000 pos: 319991 size: 209
+ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 319991 size: 209
ret: 0 st:-1 flags:0 ts: 0.460008
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146703 size: 27925
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 513 size: 27837
+ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 512 size: 208
diff --git a/tests/ref/seek/lavf_mpg b/tests/ref/seek/lavf_mpg
index aad61dc..0f0d720 100644
--- a/tests/ref/seek/lavf_mpg
+++ b/tests/ref/seek/lavf_mpg
@@ -1,53 +1,53 @@
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts: 1.894167
ret: 0 st: 0 flags:0 dts: 1.880000 pts: 1.920000 pos: 327680 size: 12894
ret: 0 st: 0 flags:0 ts: 0.788333
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 0 flags:1 ts:-0.317500
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 1 flags:0 ts: 2.576667
-ret: 0 st: 1 flags:1 dts: 1.783678 pts: 1.783678 pos: 368652 size: 379
+ret: 0 st: 1 flags:1 dts: 1.772767 pts: 1.772767 pos: 368652 size: 379
ret: 0 st: 1 flags:1 ts: 1.470833
-ret: 0 st: 1 flags:1 dts: 1.261222 pts: 1.261222 pos: 145408 size: 261
+ret: 0 st: 1 flags:1 dts: 1.250322 pts: 1.250322 pos: 145408 size: 261
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 0 flags:0 ts: 2.153333
ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.960000 pos: 339968 size: 681
ret: 0 st: 0 flags:1 ts: 1.047500
ret: 0 st: 0 flags:0 dts: 1.040000 pts: 1.080000 pos: 40960 size: 16073
ret: 0 st: 1 flags:0 ts:-0.058333
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 1 flags:1 ts: 2.835833
-ret: 0 st: 1 flags:1 dts: 1.783678 pts: 1.783678 pos: 368652 size: 379
+ret: 0 st: 1 flags:1 dts: 1.772767 pts: 1.772767 pos: 368652 size: 379
ret: 0 st:-1 flags:0 ts: 1.730004
ret: 0 st: 0 flags:0 dts: 1.760000 pts: 1.800000 pos: 292864 size: 13170
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 0 flags:0 ts:-0.481667
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 0 flags:1 ts: 2.412500
ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.960000 pos: 339968 size: 681
ret: 0 st: 1 flags:0 ts: 1.306667
-ret: 0 st: 1 flags:1 dts: 1.522444 pts: 1.522444 pos: 342028 size: 314
+ret: 0 st: 1 flags:1 dts: 1.511544 pts: 1.511544 pos: 342028 size: 314
ret: 0 st: 1 flags:1 ts: 0.200844
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
ret: 0 st: 0 flags:1 dts: 1.920000 pts: 1.960000 pos: 339968 size: 681
ret: 0 st: 0 flags:0 ts: 0.883344
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 0 flags:1 ts:-0.222489
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st: 1 flags:0 ts: 2.671678
-ret: 0 st: 1 flags:1 dts: 1.783678 pts: 1.783678 pos: 368652 size: 379
+ret: 0 st: 1 flags:1 dts: 1.772767 pts: 1.772767 pos: 368652 size: 379
ret: 0 st: 1 flags:1 ts: 1.565844
-ret: 0 st: 1 flags:1 dts: 1.522444 pts: 1.522444 pos: 342028 size: 314
+ret: 0 st: 1 flags:1 dts: 1.511544 pts: 1.511544 pos: 342028 size: 314
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 1 flags:1 dts: 1.000000 pts: 1.000000 pos: 2048 size: 208
+ret: 0 st: 1 flags:1 dts: 0.989089 pts: 0.989089 pos: 2048 size: 208
diff --git a/tests/ref/seek/lavf_ts b/tests/ref/seek/lavf_ts
index 9ed59ef..81093b7 100644
--- a/tests/ref/seek/lavf_ts
+++ b/tests/ref/seek/lavf_ts
@@ -2,13 +2,13 @@ ret: 0 st: 0 flags:1 dts: 1.360000 pts: 1.400000 pos: 564 size: 24801
ret: 0 st:-1 flags:0 ts:-1.000000
ret: 0 st: 0 flags:0 dts: 1.440000 pts: 1.480000 pos: 44932 size: 14502
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st: 0 flags:0 ts: 0.788333
ret: 0 st: 0 flags:0 dts: 1.520000 pts: 1.560000 pos: 74260 size: 13388
ret: 0 st: 0 flags:1 ts:-0.317500
ret: 0 st: 0 flags:1 dts: 1.360000 pts: 1.400000 pos: 564 size: 24801
ret: 0 st: 1 flags:0 ts: 2.576667
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st: 1 flags:1 ts: 1.470833
ret: 0 st: 0 flags:0 dts: 2.160000 pts: 2.200000 pos: 325240 size: 12679
ret: 0 st:-1 flags:0 ts: 0.365002
@@ -16,21 +16,21 @@ ret: 0 st: 0 flags:0 dts: 1.440000 pts: 1.480000 pos: 44932 size: 14502
ret: 0 st:-1 flags:1 ts:-0.740831
ret: 0 st: 0 flags:1 dts: 1.360000 pts: 1.400000 pos: 564 size: 24801
ret: 0 st: 0 flags:0 ts: 2.153333
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st: 0 flags:1 ts: 1.047500
ret: 0 st: 0 flags:0 dts: 1.680000 pts: 1.720000 pos: 130096 size: 14133
ret: 0 st: 1 flags:0 ts:-0.058333
ret: 0 st: 0 flags:0 dts: 1.440000 pts: 1.480000 pos: 44932 size: 14502
ret: 0 st: 1 flags:1 ts: 2.835833
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st:-1 flags:1 ts: 0.624171
ret: 0 st: 0 flags:1 dts: 1.360000 pts: 1.400000 pos: 564 size: 24801
ret: 0 st: 0 flags:0 ts:-0.481667
ret: 0 st: 0 flags:0 dts: 1.440000 pts: 1.480000 pos: 44932 size: 14502
ret: 0 st: 0 flags:1 ts: 2.412500
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st: 1 flags:0 ts: 1.306667
ret: 0 st: 0 flags:0 dts: 2.080000 pts: 2.120000 pos: 294032 size: 13839
ret: 0 st: 1 flags:1 ts: 0.200844
@@ -38,13 +38,13 @@ ret: 0 st: 0 flags:1 dts: 1.360000 pts: 1.400000 pos: 564 size: 24801
ret: 0 st:-1 flags:0 ts:-0.904994
ret: 0 st: 0 flags:0 dts: 1.440000 pts: 1.480000 pos: 44932 size: 14502
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st: 0 flags:0 ts: 0.883344
ret: 0 st: 0 flags:0 dts: 1.600000 pts: 1.640000 pos: 102836 size: 12781
ret: 0 st: 0 flags:1 ts:-0.222489
ret: 0 st: 0 flags:1 dts: 1.360000 pts: 1.400000 pos: 564 size: 24801
ret: 0 st: 1 flags:0 ts: 2.671678
-ret: 0 st: 1 flags:1 dts: 2.131433 pts: 2.131433 pos: 403636 size: 209
+ret: 0 st: 1 flags:1 dts: 2.120522 pts: 2.120522 pos: 403636 size: 209
ret: 0 st: 1 flags:1 ts: 1.565844
ret: 0 st: 0 flags:0 dts: 2.240000 pts: 2.280000 pos: 350996 size: 11307
ret: 0 st:-1 flags:0 ts: 0.460008
More information about the ffmpeg-cvslog
mailing list