Index: libavformat/matroskadec.c
===================================================================
--- libavformat/matroskadec.c	(revision 25390)
+++ libavformat/matroskadec.c	(working copy)
@@ -1891,6 +1891,7 @@
     }
 
     url_fseek(s->pb, st->index_entries[index_min].pos, SEEK_SET);
+    matroska->current_id = 0;
     matroska->skip_to_keyframe = !(flags & AVSEEK_FLAG_ANY);
     matroska->skip_to_timecode = st->index_entries[index].timestamp;
     matroska->done = 0;
