fixed flushing buffered frames from the decoder
added seek method