asfdec: always reset packet state after seeking
authorHendrik Leppkes <h.leppkes@gmail.com>
Sun, 12 Jul 2015 10:34:13 +0000 (12:34 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 12 Jul 2015 11:24:23 +0000 (13:24 +0200)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavformat/asfdec.c

index 8e706fb..eaa69fd 100644 (file)
@@ -1558,12 +1558,10 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
     } else {
         if ((ret = ff_seek_frame_binary(s, stream_index, timestamp, flags)) < 0)
             return ret;
-
-        // asf_read_timestamp is called inside ff_seek_frame_binary and leaves state dirty,
-        // so reset_packet_state have to be called after it.
-        reset_packet_state(s);
     }
 
+    reset_packet_state(s);
+
     return 0;
 }