Reset reading state after successful seek.
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 7 Jun 2008 00:35:37 +0000 (00:35 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sat, 7 Jun 2008 00:35:37 +0000 (00:35 +0000)
Originally committed as revision 13682 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/ffmdec.c
tests/ffserver.regression.ref

index a959d6b..9e1d57f 100644 (file)
@@ -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;
 }
 
index e6f90b7..f73250d 100644 (file)
@@ -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