changeset 3437:82c4cc2aae2a libavformat

Reset reading state after successful seek.
author bcoudurier
date Sat, 07 Jun 2008 00:35:37 +0000
parents ec4945b71d48
children 40995a9455e3
files ffmdec.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ffmdec.c	Fri Jun 06 21:54:07 2008 +0000
+++ b/ffmdec.c	Sat Jun 07 00:35:37 2008 +0000
@@ -454,6 +454,13 @@
         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;
 }