diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-07 00:35:37 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-07 00:35:37 +0000 |
commit | c07d64c8900e845271f81285968d0791613ff6c7 (patch) | |
tree | 2828daa8e13c1d9164f4f1d28e0e6da477ad9713 | |
parent | 15d856e8d2757644b2dcb82dddcd43d68c281c40 (diff) | |
download | ffmpeg-c07d64c8900e845271f81285968d0791613ff6c7.tar.gz |
Reset reading state after successful seek.
Originally committed as revision 13682 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/ffmdec.c | 7 | ||||
-rw-r--r-- | tests/ffserver.regression.ref | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index a959d6b8d4..9e1d57f3d2 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -454,6 +454,13 @@ static int ffm_seek(AVFormatContext *s, int stream_index, int64_t wanted_pts, in pos -= FFM_PACKET_SIZE; found: ffm_seek1(s, pos); + + /* reset read state */ + ffm->read_state = READ_HEADER; + ffm->packet_ptr = ffm->packet; + ffm->packet_end = ffm->packet; + ffm->first_packet = 1; + return 0; } diff --git a/tests/ffserver.regression.ref b/tests/ffserver.regression.ref index e6f90b7eef..f73250dfa7 100644 --- a/tests/ffserver.regression.ref +++ b/tests/ffserver.regression.ref @@ -1,9 +1,9 @@ 18c4ba0e8e7adb781216e38de61c2e39 ff-test_h.avi 9818d41feb3e41efd5137c722f86f8f0 ff-test_l.avi d976848a9e4d5d8fc2659e4841cdece5 ff-test.swf -1000bd1df1c1aa97ca3123da191ae6b1 ff-test_h.asf +7fa2bf4429c4bcd43bedc378ad89d799 ff-test_h.asf 0118b6fed8db6107bf50560fecaec6d3 ff-test_l.asf -60550d751dfa5172d878f7dd670e3aa4 ff-test_h.rm +942cdeafce330bf86ead504869d682da ff-test_h.rm e84b0b64f41714b792451015223f7764 ff-test_l.rm 35d3332d7ef440273e8ebcfedeeae1ca ff-test.jpg fe20235b8830e3a0e49a51dfcfb2a7a7 ff-test_small.jpg |