aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ffmdec.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-07 00:35:37 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-07 00:35:37 +0000
commitc07d64c8900e845271f81285968d0791613ff6c7 (patch)
tree2828daa8e13c1d9164f4f1d28e0e6da477ad9713 /libavformat/ffmdec.c
parent15d856e8d2757644b2dcb82dddcd43d68c281c40 (diff)
downloadffmpeg-c07d64c8900e845271f81285968d0791613ff6c7.tar.gz
Reset reading state after successful seek.
Originally committed as revision 13682 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ffmdec.c')
-rw-r--r--libavformat/ffmdec.c7
1 files changed, 7 insertions, 0 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;
}