aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-02 16:47:51 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-02 16:47:51 +0000
commitc45ebd546195a35b47e502d40e1b9cd48f82a21f (patch)
treeb023f0c893ef5ab326b83fff3626fb2803119bf8
parent3890dd3a5c0e375ee7ea23be39b363aa2f361c89 (diff)
downloadffmpeg-c45ebd546195a35b47e502d40e1b9cd48f82a21f.tar.gz
Set AVPacket.pos in MPEG-PS demuxer.
Originally committed as revision 21604 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mpeg.c1
-rw-r--r--tests/seek.regression.ref54
2 files changed, 28 insertions, 27 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index c5afa1d1cb..d4d4d212b0 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -557,6 +557,7 @@ static int mpegps_read_packet(AVFormatContext *s,
get_buffer(s->pb, pkt->data, pkt->size);
pkt->pts = pts;
pkt->dts = dts;
+ pkt->pos = dummy_pos;
pkt->stream_index = st->index;
#if 0
av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n",
diff --git a/tests/seek.regression.ref b/tests/seek.regression.ref
index cf089aa0a0..ae3d94a4d8 100644
--- a/tests/seek.regression.ref
+++ b/tests/seek.regression.ref
@@ -3157,59 +3157,59 @@ ret: 0 st:-1 flags:1 ts:-0.645825
ret: 0 st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos: 36 size: 27837
----------------
tests/data/b-lavf.mpg
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st:-1 flags:0 ts:-1.000000
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts: 1.894167
-ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: -1 size: 681
+ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: 339968 size: 681
ret: 0 st: 0 flags:0 ts: 0.788333
-ret: 0 st: 1 flags:1 dts: 0.761222 pts: 0.761222 pos: -1 size: 261
+ret: 0 st: 1 flags:1 dts: 0.761222 pts: 0.761222 pos: 145408 size: 261
ret: 0 st: 0 flags:1 ts:-0.317500
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st: 1 flags:0 ts: 2.576667
-ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: -1 size: 235
+ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: 370700 size: 235
ret: 0 st: 1 flags:1 ts: 1.470833
-ret: 0 st: 1 flags:1 dts: 1.283678 pts: 1.283678 pos: -1 size: 379
+ret: 0 st: 1 flags:1 dts: 1.283678 pts: 1.283678 pos: 368652 size: 379
ret: 0 st:-1 flags:0 ts: 0.365002
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts:-0.740831
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st: 0 flags:0 ts: 2.153333
-ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: -1 size: 681
+ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: 339968 size: 681
ret: 0 st: 0 flags:1 ts: 1.047500
-ret: 0 st: 0 flags:0 dts: 1.020000 pts: 1.060000 pos: -1 size: 16484
+ret: 0 st: 0 flags:0 dts: 1.020000 pts: 1.060000 pos: 212992 size: 16484
ret: 0 st: 1 flags:0 ts:-0.058333
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st: 1 flags:1 ts: 2.835833
-ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: -1 size: 235
+ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: 370700 size: 235
ret: 0 st:-1 flags:0 ts: 1.730004
-ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: -1 size: 681
+ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: 339968 size: 681
ret: 0 st:-1 flags:1 ts: 0.624171
-ret: 0 st: 0 flags:0 dts: 0.620000 pts: 0.660000 pos: -1 size: 15804
+ret: 0 st: 0 flags:0 dts: 0.620000 pts: 0.660000 pos: 67584 size: 15804
ret: 0 st: 0 flags:0 ts:-0.481667
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st: 0 flags:1 ts: 2.412500
-ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: -1 size: 681
+ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: 339968 size: 681
ret: 0 st: 1 flags:0 ts: 1.306667
-ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: -1 size: 235
+ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: 370700 size: 235
ret: 0 st: 1 flags:1 ts: 0.200844
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st:-1 flags:0 ts:-0.904994
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st:-1 flags:1 ts: 1.989173
-ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: -1 size: 681
+ret: 0 st: 0 flags:1 dts: 1.420000 pts: 1.460000 pos: 339968 size: 681
ret: 0 st: 0 flags:0 ts: 0.883344
-ret: 0 st: 0 flags:0 dts: 0.900000 pts: 0.940000 pos: -1 size: 12809
+ret: 0 st: 0 flags:0 dts: 0.900000 pts: 0.940000 pos: 159744 size: 12809
ret: 0 st: 0 flags:1 ts:-0.222489
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
ret: 0 st: 1 flags:0 ts: 2.671678
-ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: -1 size: 235
+ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: 370700 size: 235
ret: 0 st: 1 flags:1 ts: 1.565844
-ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: -1 size: 235
+ret: 0 st: 1 flags:1 dts: 1.518778 pts: 1.518778 pos: 370700 size: 235
ret: 0 st:-1 flags:0 ts: 0.460008
-ret: 0 st: 0 flags:0 dts: 0.500000 pts: 0.540000 pos: -1 size: 16303
+ret: 0 st: 0 flags:0 dts: 0.500000 pts: 0.540000 pos: 26624 size: 16303
ret: 0 st:-1 flags:1 ts:-0.645825
-ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: -1 size: 208
+ret: 0 st: 1 flags:1 dts: 0.500000 pts: 0.500000 pos: 2048 size: 208
----------------
tests/data/b-lavf.mxf
ret: 0 st: 0 flags:1 dts: 0.000000 pts: NOPTS pos: 6144 size: 24801